MCPcopy Create free account
hub / github.com/numpy/numpy / compress_cols

Function compress_cols

numpy/ma/extras.py:939–954  ·  view source on GitHub ↗

Suppress whole columns of a 2-D array that contain masked values. This is equivalent to ``np.ma.compress_rowcols(a, 1)``, see `compress_rowcols` for details. See Also -------- compress_rowcols

(a)

Source from the content-addressed store, hash-verified

937
938
939def compress_cols(a):
940 """
941 Suppress whole columns of a 2-D array that contain masked values.
942
943 This is equivalent to ``np.ma.compress_rowcols(a, 1)``, see
944 `compress_rowcols` for details.
945
946 See Also
947 --------
948 compress_rowcols
949
950 """
951 a = asarray(a)
952 if a.ndim != 2:
953 raise NotImplementedError("compress_cols works for 2D arrays only.")
954 return compress_rowcols(a, 1)
955
956
957def mask_rowcols(a, axis=None):

Callers

nothing calls this directly

Calls 2

compress_rowcolsFunction · 0.85
asarrayFunction · 0.70

Tested by

no test coverage detected