There is ...
or Ellipsis
, which does exactly this:
slice = myarray[..., i]
Ellipsis is the python object, if you should want to use it outside the square bracket notation.
More Related Contents:
- Binning a column with Python Pandas
- Fitting empirical distribution to theoretical ones with Scipy (Python)?
- ValueError: setting an array element with a sequence
- Numpy `logical_or` for more than two arguments
- Simple Digit Recognition OCR in OpenCV-Python
- Best way to join / merge by range in pandas
- ImportError: numpy.core.multiarray failed to import
- How do you use the ellipsis slicing syntax in Python?
- Fast replacement of values in a numpy array
- Concatenate two NumPy arrays vertically
- How to make scipy.interpolate give an extrapolated result beyond the input range?
- Inverse Distance Weighted (IDW) Interpolation with Python
- Convert NumPy array to Python list
- Saving to hdf5 is very slow (Python freezing)
- Relationship between SciPy and NumPy
- Multivariate spline interpolation in python/scipy?
- Removing duplicate columns and rows from a NumPy 2D array
- How to conditionally combine two numpy arrays of the same shape
- scipy curve_fit doesn’t like math module
- Numpy Pure Functions for performance, caching
- Pythonic way of detecting outliers in one dimensional observation data
- Conditional assignment of tensor values in TensorFlow
- LogisticRegression: Unknown label type: ‘continuous’ using sklearn in python
- Are NumPy’s math functions faster than Python’s?
- Using datetime as ticks in Matplotlib
- How to count values in a certain range in a Numpy array?
- How to remove all rows in a numpy.ndarray that contain non-numeric values
- Split Python sequence (time series/array) into subsequences with overlap
- numpy arange: how to make “precise” array of floats?
- Sort array’s rows by another array in Python