crop#
- atompy.crop(x, y, lower=-inf, upper=inf)[source]#
Return x,y data where lower <= x < upper.
- Parameters:
- x, yarray_like
The x and y data
- lower
float, default -np.inf lower limit, inclusive
- upper
float, default +np.inf upper limit, exclusive
- Returns:
Examples
>>> import atompy as ap >>> import numpy as np >>> x = y = np.arange(6) >>> x, y (array([0, 1, 2, 3, 4, 5]), array([0, 1, 2, 3, 4, 5])) >>> ap.crop(x, y, 1, 4) (array([1, 2, 3]), array([1, 2, 3]))