v923z / micropython-ulab

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

Fix create_arange empty range #604

Closed FelixNumworks closed 1 year ago

FelixNumworks commented 1 year ago

Hi ! I found this bug when inputing arange(0,0)

v923z commented 1 year ago

Many thanks for tracking it down!

There seems to be an error in the expected file: https://github.com/v923z/micropython-ulab/actions/runs/4787405019/jobs/8514042245?pr=604

Finally, could you, please, increment the version number in https://github.com/v923z/micropython-ulab/blob/afc8e4e165bb2c90c9614776c04df51c30eb1145/code/ulab.c#L36? Since this is a minor bug fix, I would say, set it to 6.0.8.

FelixNumworks commented 1 year ago

I edited the commit. The error in the tests was due to a typo at this line (I wrote dtype=type instead of dtype=dtype) https://github.com/v923z/micropython-ulab/blob/c3b1cdebef6be13d55d8151536ad98a070287a84/tests/2d/numpy/arange.py#L13

You're welcome :)

v923z commented 1 year ago

Thanks!