Home>
import numpy as np
np.arange (10)
array ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
np.arrange (-10)
array ([], dtype = int64)
Can you tell me if you know how to create a negative array?
If i don't use Numpy, you could do it like this ...
[i for i in range (-1, -10, -2)]
Related questions
- how to write a program that takes the l2 norm of python without using the for statement, about speeding up
- i want to initialize a string with python numpy
- python - pass the calculation defined by the function for all combinations of arrays
- python - bandpass filter does not work well with pyaudio
- how to save the image ocr result file in python
- python - i want to speed up the for statement
- python - canvas multiple color change
- error in python/discord bot
- [python] functions in the class that inherits formatter do not work
- error in python, subprocess
Three arguments, start, stop, and step can be passed as needed.
numpy.arange — NumPy v1.17 Manual