Skip to content

Updated to Python 3.13 and now getting numpy array errors #4

@kjkEP6

Description

@kjkEP6

I recently installed the latest version of Python 3.13 and now when I try to run rxd using the test data I get the following error:
In [26]: rxvals = rx(img)

TypeError Traceback (most recent call last)
Cell In[26], line 1
----> 1 rxvals = rx(img)

File ~\development\spectral-0.24\spectral\algorithms\detectors.py:374, in rx(X, background, window, cov)
371 return map_outer_window_stats(rx_wrapper, X, window[0], window[1],
372 dim_out=1, cov=cov)
373 else:
--> 374 return RX(background)(X)

File ~\development\spectral-0.24\spectral\algorithms\detectors.py:237, in RX.call(self, X)
219 '''Applies the RX anomaly detector to X.
220
221 Arguments:
(...) 234 of floats with one less dimension than the input.
235 '''
236 if not isinstance(X, np.ndarray):
--> 237 raise TypeError('Expected a numpy.ndarray.')
239 if self.background is None:
240 self.set_background(calc_stats(X))

TypeError: Expected a numpy.ndarray.

Anyone else? Why now and how to fix?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions