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
Hi!
Z = base[6:2:-1, 5::-1] find_index(base, Z)
produces an exception
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
The problem is here, in line 43
from-python-to-numpy/code/find_index.py
Lines 41 to 45 in eb21651
We've checked that stop is not None, but step is less than zero and we didn't check start, BOOM!
I suggest code like this:
if step is not None: if step < 0: start, stop = stop, start if stop is not None: stop += np.sign(step)
The text was updated successfully, but these errors were encountered:
Sorry for late reply. You mean your fix solve the problem ? Could you make a PR?
Sorry, something went wrong.
No branches or pull requests
Hi!
produces an exception
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
The problem is here, in line 43
from-python-to-numpy/code/find_index.py
Lines 41 to 45 in eb21651
We've checked that stop is not None, but step is less than zero and we didn't check start, BOOM!
I suggest code like this:
The text was updated successfully, but these errors were encountered: