UMR-CNRM / ctypesForFortran

Bindings to Fortran subroutines using ctypes
Other
0 stars 1 forks source link

Incompatibility of v1.1.0 with recent numpy #3

Closed AlexandreMary closed 5 months ago

AlexandreMary commented 5 months ago

numpy.int disappeared I guess (was OK with 1.0.1, I think I remember having cleaned it in epygram, it would have reentered by mistake ?) Alexandre

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/mary/pestepy/lib/python3.10/site-packages/epygram/formats/__init__.py", line 138, in resource
    fmt = guess(filename)
  File "/home/mary/pestepy/lib/python3.10/site-packages/epygram/formats/__init__.py", line 113, in guess
    r = fpx.dataformat(filename=filename, openmode='r', format=f)
  File "/home/common/sync/vortex/vortex-olive/site/footprints/collectors.py", line 389, in load
    return self.pickup(desc).get(self.tag, None)
  File "/home/common/sync/vortex/vortex-olive/site/footprints/collectors.py", line 310, in pickup
    return self.pickup_and_cache(desc, resolvecache=resolvecache)[0]
  File "/home/common/sync/vortex/vortex-olive/site/footprints/collectors.py", line 284, in pickup_and_cache
    desc[self.tag] = self.find_best(desc, resolvecache=resolvecache)
  File "/home/common/sync/vortex/vortex-olive/site/footprints/collectors.py", line 385, in find_best
    return topcl(topr, checked=True)
  File "/home/mary/pestepy/lib/python3.10/site-packages/epygram/formats/DDHLFA.py", line 70, in __init__
    if not LFA4py.wlfatest(self.container.abspath):
  File "/home/mary/pestepy/lib/python3.10/site-packages/epygram/extra/falfilfa4py/LFA.py", line 40, in wrapper
    result = func(*args)
  File "/home/mary/pestepy/lib/python3.10/site-packages/ctypesForFortran/__init__.py", line 554, in wrapper
    assert all(all((isinstance(item, (int, numpy.int, numpy.int64)) and
  File "/home/mary/pestepy/lib/python3.10/site-packages/ctypesForFortran/__init__.py", line 554, in <genexpr>
    assert all(all((isinstance(item, (int, numpy.int, numpy.int64)) and
  File "/home/mary/pestepy/lib/python3.10/site-packages/ctypesForFortran/__init__.py", line 554, in <genexpr>
    assert all(all((isinstance(item, (int, numpy.int, numpy.int64)) and
  File "/home/mary/pestepy/lib/python3.10/site-packages/numpy/__init__.py", line 324, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'int'.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'inf'?
SebastienRietteMTO commented 5 months ago

Reentered by mistake... Indeed... Corrected in ef83aa4b33abe910ccc2f11bb9750e44064776d3 (version 1.1.1) and in 7f521f78d0867fea5b16d428274c19a326f18463 (2.0.1)