Skip to content

cache dtype.__hash__ #5339

@pitrou

Description

@pitrou

It would be nice to cache the hash value of dtypes, since computation can be non-trivial for complex (e.g. structured) dtypes.

I would like to contribute this but I had some trouble running the test suite, and now I'm not able to build Numpy anymore:

$ python3.4 setup.py build
Running from numpy source directory.
Traceback (most recent call last):
  File "setup.py", line 251, in <module>
    setup_package()
  File "setup.py", line 235, in setup_package
    from numpy.distutils.core import setup
  File "/home/antoine/np/numpy/distutils/__init__.py", line 37, in <module>
    from numpy.testing import Tester
  File "/home/antoine/np/numpy/testing/__init__.py", line 14, in <module>
    from .utils import *
  File "/home/antoine/np/numpy/testing/utils.py", line 17, in <module>
    from numpy.core import float32, empty, arange, array_repr, ndarray
  File "/home/antoine/np/numpy/core/__init__.py", line 14, in <module>
    from . import multiarray
ImportError: cannot import name 'multiarray'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions