Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

numpy generate sequence

>>> np.arange(3,7)
array([3, 4, 5, 6])

>>> np.linspace(2.0, 3.0, num=5)
array([2. , 2.25, 2.5 , 2.75, 3. ])

>>> np.logspace(2.0, 3.0, num=4, base=2.0)
array([4. , 5.0396842 , 6.34960421, 8. ])
Source by blog.csdn.net #
 
PREVIOUS NEXT
Tagged: #numpy #generate #sequence
ADD COMMENT
Topic
Name
1+3 =