import numpy as np
array ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
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)]
Answer # 1
Three arguments, start, stop, and step can be passed as needed.
>>>import numpy as np >>>np.arange (-10, 0) array ([-10, -9, -8, -7, -6, -5, -4, -3, -2, -1])
numpy.arange — NumPy v1.17 Manual
- 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