About 1,570 results
Open links in new tab
  1. numpy.linspace — NumPy v2.2 Manual

    numpy. linspace (start, stop, num = 50, endpoint = True, retstep = False, dtype = None, axis = 0, *, device = None) [source] # Return evenly spaced numbers over a specified interval. Returns num evenly spaced samples, calculated over the interval [ start , stop ].

  2. numpy.linspace — NumPy v2.1 Manual

    numpy. linspace (start, stop, num = 50, endpoint = True, retstep = False, dtype = None, axis = 0, *, device = None) [source] # Return evenly spaced numbers over a specified interval. Returns num evenly spaced samples, calculated over the interval [ start , stop ].

  3. How to create arrays with regularly-spaced values - NumPy

    In this case, you should use numpy.linspace instead. Use numpy.linspace if you want the endpoint to be included in the result, or if you are using a non-integer step size. numpy.linspace can include the endpoint and determines step size from the num argument, which specifies the number of elements in the returned array.

  4. numpy.linspace — NumPy v1.22 Manual

    numpy. linspace (start, stop, num = 50, endpoint = True, retstep = False, dtype = None, axis = 0) [source] ¶ Return evenly spaced numbers over a specified interval. Returns num evenly spaced samples, calculated over the interval [ start , stop ].

  5. numpy.logspace — NumPy v2.2 Manual

    >>> import matplotlib.pyplot as plt >>> N = 10 >>> x1 = np. logspace (0.1, 1, N, endpoint = True) >>> x2 = np. logspace (0.1, 1, N, endpoint = False) >>> y = np. zeros (N) >>> plt. plot (x1, y, 'o') [<matplotlib.lines.Line2D object at 0x...>] >>> plt. plot (x2, y + 0.5, 'o') [<matplotlib.lines.Line2D object at 0x...>] >>> plt. ylim ([-0.5, 1 ...

  6. numpy.meshgrid — NumPy v2.2 Manual

    >>> xv, yv = np. meshgrid (x, y, sparse = True) >>> xv array([[0. , 0.5, 1. ]]) >>> yv array([[0.], [1.]]) meshgrid is very useful to evaluate functions on a grid. If the function depends on all coordinates, both dense and sparse outputs can be used.

  7. numpy.linspace — NumPy v1.13 Manual

    Jun 10, 2017 · numpy.linspace (start, stop, num=50, endpoint=True, retstep=False, dtype=None) [source] ¶ Return evenly spaced numbers over a specified interval. Returns num evenly spaced samples, calculated over the interval [ start , stop ].

  8. numpy.arange — NumPy v2.2 Manual

    For integer arguments the function is roughly equivalent to the Python built-in range, but returns an ndarray rather than a range instance. When using a non-integer step, such as 0.1, it is often better to use numpy.linspace. See the Warning sections below for more information. Parameters: start integer or real, optional. Start of interval.

  9. NumPy: the absolute basics for beginners — NumPy v2.2 Manual

    You can also use np.linspace() to create an array with values that are spaced linearly in a specified interval: >>> np . linspace ( 0 , 10 , num = 5 ) array([ 0. , 2.5, 5. , 7.5, 10. Specifying your data type

  10. NumPy quickstart — NumPy v2.2 Manual

    >>> from numpy import pi >>> np. linspace (0, 2, 9) # 9 numbers from 0 to 2 array([0. , 0.25, 0.5 , 0.75, 1. , 1.25, 1.5 , 1.75, 2. ]) >>> x = np. linspace (0, 2 * pi, 100) # useful to evaluate function at lots of points >>> f = np. sin (x)

Refresh