Skip to content

MacOS: numpy is throwing error with July 2023 authoritative spack merge #699

@srherbener

Description

@srherbener

Describe the bug

Using Dom's feature/merge_spack_develop_20230710 branches, spack-stack will now build on the Mac, but new test failures are introduced related to the py-numpy package. Here is a sample:

1: /Users/steveherbener/projects/DEVELOP/jedi-bundle/build/bin/nsidc_l4cdr_ice2ioda.py:40: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
1:   datein = ncd.variables['time'][:] + 0.5
1:  Reading file:  testinput/nsidc_l4_icec.nc
1: Traceback (most recent call last):
1:   File "/Users/steveherbener/projects/DEVELOP/jedi-bundle/build/bin/nsidc_l4cdr_ice2ioda.py", line 166, in <module>
1:     main()
1:   File "/Users/steveherbener/projects/DEVELOP/jedi-bundle/build/bin/nsidc_l4cdr_ice2ioda.py", line 154, in main
1:     ice = Observation(args.input, args.thin, fdate)
1:   File "/Users/steveherbener/projects/DEVELOP/jedi-bundle/build/bin/nsidc_l4cdr_ice2ioda.py", line 35, in __init__
1:     self._read()
1:   File "/Users/steveherbener/projects/DEVELOP/jedi-bundle/build/bin/nsidc_l4cdr_ice2ioda.py", line 40, in _read
1:     datein = ncd.variables['time'][:] + 0.5
1:   File "netCDF4/_netCDF4.pyx", line 4446, in netCDF4._netCDF4.Variable.__getitem__
1:   File "netCDF4/_netCDF4.pyx", line 4511, in netCDF4._netCDF4.Variable._toma
1:   File "/Users/steveherbener/spack-stack/envs/unified.spack-merge.mymacos/install/apple-clang/14.0.3/py-numpy-1.25.0-64heeas/lib/python3.10/site-packages/numpy/__init__.py", line 313, in __getattr__
1:     raise AttributeError(__former_attrs__[attr])
1: AttributeError: module 'numpy' has no attribute 'bool'.
1: `np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
1: The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
1:     https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
1/1 Test #1: test_iodaconv_nsidc_l4cdr_icec ...***Failed    0.63 sec

To Reproduce
On the Mac:

Build spack-stack using Dom's feature/merge_spack_develop_20230710 branches.

Then:

git clone https://github.com/jcsda-internal/jedi-bundle
cd jedi-bundle
mkdir build
cd build
ecbuild -DBUILD_IODA_CONVERTERS=ON -DPython3_EXECUTABLE=$(which python3) ..
make -j8
ctest

Expected behavior

numpy loads and executes successfully as before

System:

Mac, Ventura 13.5, apple [email protected], [email protected]

Additional context

Metadata

Metadata

Assignees

Labels

bugSomething is not working

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions