v923z / micropython-ulab

a numpy-like fast vector module for micropython, circuitpython, and their derivatives
https://micropython-ulab.readthedocs.io/en/latest
MIT License
432 stars 117 forks source link

[BUG] Numpy Module has no delete method #513

Closed Gruftgrabbler closed 2 years ago

Gruftgrabbler commented 2 years ago

Describe the bug

On my raspberry pi Pico I can't use the uLab function delete which should be implemented regarding to the documentation.

Example:

>>> from ulab import numpy as np
>>> a = np.array(range(25), dtype=np.uint8).reshape((5,5))

>>> print('a:\n', a)

a:
 array([[0, 1, 2, 3, 4],
       [5, 6, 7, 8, 9],
       [10, 11, 12, 13, 14],
       [15, 16, 17, 18, 19],
       [20, 21, 22, 23, 24]], dtype=uint8)
>>> print('\naxis = 0\n', np.delete(a, 2, axis=0))

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'delete'

To Reproduce Copy And paste the code into a REPL shell

Expected behavior I expected the same output of the documentation

v923z commented 2 years ago

I don't know what you mean, when saying "my raspberry pi Pico I can't use the uLab". Where does the firmware come from? From https://github.com/v923z/micropython-builder/releases, or piromoni, or somewhere else, or you compile it? What is the version of the ulab that you are using? I have just tried on the unix port, delete is there.

If you are compiling yourself, you set the functions in the header https://github.com/v923z/micropython-ulab/blob/master/code/ulab.h.

v923z commented 2 years ago

@Gruftgrabbler Is there anything we have to do at this stage, or can we close the issue?

v923z commented 2 years ago

This issue seems to be inactive, so closing now.