We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
From https://github.com/hyperspy/hyperspy-extensions-list/actions/runs/3119041322/jobs/5058746331
=================================== FAILURES =================================== ______________________ TestLumiSpectrum.test_errors_raise ______________________ a = [array([ 0. , 5.44444444, 10.88888889, 16.33333333, 21.77777778, [27](https://github.com/hyperspy/hyperspy-extensions-list/actions/runs/3119041322/jobs/5058746331#step:16:28).22222222, [32](https://github.com/hyperspy/hyperspy-extensions-list/actions/runs/3119041322/jobs/5058746331#step:16:33).66666667, 38.11111111,...., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.])] @array_function_dispatch(_shape_dispatcher) def shape(a): """ Return the shape of an array. Parameters ---------- a : array_like Input array. Returns ------- shape : tuple of ints The elements of the shape tuple give the lengths of the corresponding array dimensions. See Also -------- len : ``len(a)`` is equivalent to ``np.shape(a)[0]`` for N-D arrays with ``N>=1``. ndarray.shape : Equivalent array method. Examples -------- >>> np.shape(np.eye(3)) (3, 3) >>> np.shape([[1, 3]]) (1, 2) >>> np.shape([0]) (1,) >>> np.shape(0) () >>> a = np.array([(1, 2), (3, 4), (5, 6)], ... dtype=[('x', 'i4'), ('y', 'i4')]) >>> np.shape(a) (3,) >>> a.shape (3,) """ try: > result = a.shape E AttributeError: 'list' object has no attribute 'shape' /usr/share/miniconda3/lib/python3.10/site-packages/numpy/core/fromnumeric.py:20[33](https://github.com/hyperspy/hyperspy-extensions-list/actions/runs/3119041322/jobs/5058746331#step:16:34): AttributeError During handling of the above exception, another exception occurred: self = <lumispy.tests.signals.test_luminescence_spectrum.TestLumiSpectrum object at 0x7f5d5c5a2500> def test_errors_raise(self): s = LumiSpectrum(np.ones(50)) for bkg, error in error_backgrounds: with pytest.raises(error): > s.remove_background_from_file(bkg) /usr/share/miniconda3/lib/python3.10/site-packages/lumispy/tests/signals/test_luminescence_spectrum.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/share/miniconda3/lib/python3.10/site-packages/lumispy/signals/luminescence_spectrum.py:553: in remove_background_from_file if np.shape(background_xy)[0] == 1: <__array_function__ internals>:200: in shape ??? _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ a = [array([ 0. , 5.44444444, 10.88888889, 16.33333333, 21.77777778, 27.22222222, 32.66666667, 38.11111111,...., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.])] @array_function_dispatch(_shape_dispatcher) def shape(a): """ Return the shape of an array. Parameters ---------- a : array_like Input array. Returns ------- shape : tuple of ints The elements of the shape tuple give the lengths of the corresponding array dimensions. See Also -------- len : ``len(a)`` is equivalent to ``np.shape(a)[0]`` for N-D arrays with ``N>=1``. ndarray.shape : Equivalent array method. Examples -------- >>> np.shape(np.eye(3)) (3, 3) >>> np.shape([[1, 3]]) (1, 2) >>> np.shape([0]) (1,) >>> np.shape(0) () >>> a = np.array([(1, 2), (3, 4), (5, 6)], ... dtype=[('x', 'i4'), ('y', 'i4')]) >>> np.shape(a) (3,) >>> a.shape (3,) """ try: result = a.shape except AttributeError: > result = asarray(a).shape E ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part. /usr/share/miniconda3/lib/python3.10/site-packages/numpy/core/fromnumeric.py:20[35](https://github.com/hyperspy/hyperspy-extensions-list/actions/runs/3119041322/jobs/5058746331#step:16:36): ValueError
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
From https://github.com/hyperspy/hyperspy-extensions-list/actions/runs/3119041322/jobs/5058746331
The text was updated successfully, but these errors were encountered: