Package Details: python-spectral r550.1b25497-1

Git Clone URL: https://aur.archlinux.org/python-spectral.git (read-only, click to copy)
Package Base: python-spectral
Description: A Python module for hyperspectral image processing.
Upstream URL: http://www.spectralpython.net/
Licenses: MIT
Submitter: dobedobedo
Maintainer: dobedobedo
Last Packager: dobedobedo
Votes: 0
Popularity: 0.000000
First Submitted: 2022-02-17 19:33 (UTC)
Last Updated: 2023-11-01 11:10 (UTC)

Dependencies (10)

Required by (1)

Sources (1)

Latest Comments

MarsSeed commented on 2023-10-28 18:05 (UTC)

Test fails due to latest stable spectral release being incompatible with current NumPy.

I think the first three commits that are on 'develop' branch do fix the incompatibility (and also prevents something similar happening with Matplotlib):

https://github.com/spectralpython/spectral/compare/0.23.1...develop

See excerpt from test log:

------------------------------------------------------------------------
Running memmap tests.
------------------------------------------------------------------------
Testing memmaps with BIL image file.
Testing bil_memmap_read..................................... OK
Testing bil_memmap_write.................................... OK
Testing bip_memmap_read..................................... OK
Testing bip_memmap_write.................................... OK
Testing bsq_memmap_read..................................... OK
Testing bsq_memmap_write.................................... OK
Testing spyfile_has_memmap.................................. OK
Testing memmaps with BIP image file.
Testing bil_memmap_read..................................... OK
/home/user/.cache/makepkg/python-spectral/src/spectral-0.23.1/spectral/algorithms/spatial.py:618: FutureWarning: In the future `np.bool` will be 
    defined as the corresponding NumPy scalar.
  mask = np.zeros((ho, wo), dtype=np.bool)
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/user/.cache/makepkg/python-spectral/src/spectral-0.23.1/spectral/tests/run.py", line 43, in <module>
    test.run()
  File "/home/user/.cache/makepkg/python-spectral/src/spectral-0.23.1/spectral/tests/detectors.py", line 169, in run
    T().run()
  File "/home/user/.cache/makepkg/python-spectral/src/spectral-0.23.1/spectral/tests/spytest.py", line 53, in run
    method()
  File "/home/user/.cache/makepkg/python-spectral/src/spectral-0.23.1/spectral/tests/detectors.py", line 58, in test_mf_windowed_target_eq_one
    y = spy.matched_filter(X, X[ij], window=(3,7), cov=self.background.cov)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.cache/makepkg/python-spectral/src/spectral-0.23.1/spectral/algorithms/detectors.py", line 169, in matched_filter
    return map_outer_window_stats(mf_wrapper, X, window[0], window[1],
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.cache/makepkg/python-spectral/src/spectral-0.23.1/spectral/algorithms/spatial.py", line 326, in map_outer_window_stats
    return mapper(image, rslice, cslice)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.cache/makepkg/python-spectral/src/spectral-0.23.1/spectral/algorithms/spatial.py", line 454, in __call__
    interior_mask = create_mask(R // 2, C // 2, True)[2].ravel()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.cache/makepkg/python-spectral/src/spectral-0.23.1/spectral/algorithms/spatial.py", line 618, in create_mask
    mask = np.zeros((ho, wo), dtype=np.bool)
                                    ^^^^^^^
  File "/usr/lib/python3.11/site-packages/numpy/__init__.py", line 324, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'bool'.
`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.
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: 'bool_'?
==> ERROR: A failure occurred in check().
    Aborting...
 -> error making: python-spectral