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
- python : Implementing SVM from scratch using pytorch
- python : Attempt to get argmax of an Empty Sequence ARGMAX value remains empty and can not be executed.
- python : How to add to the matrix column numbers
- python : How to create a random two-dimensional array NUMPY?
- python : How to find out the coefficients of a piecewise line function during the approximation of the sample?
- Using the symbolic variables matrix in Python
- python : NUMPY column names
- Python, NUMPY How to implement this algorithm?
- python : VWAP calculation, ends with RAM, the code is performed too long
- python : Summation by Vector NUMPY Indexes
Three arguments, start, stop, and step can be passed as needed.
numpy.arange — NumPy v1.17 Manual