numpy.who#
- numpy.who(vardict=None)[source]#
Print the NumPy arrays in the given dictionary.
If there is no dictionary passed in or vardict is None then returns NumPy arrays in the globals() dictionary (all NumPy arrays in the namespace).
- Parameters
- vardictdict, optional
A dictionary possibly containing ndarrays. Default is globals().
- Returns
- outNone
Returns ‘None’.
Notes
Prints out the name, shape, bytes and type of all of the ndarrays present in vardict.
Examples
>>> a = np.arange(10) >>> b = np.ones(20) >>> np.who() Name Shape Bytes Type =========================================================== a 10 80 int64 b 20 160 float64 Upper bound on total bytes = 240
>>> d = {'x': np.arange(2.0), 'y': np.arange(3.0), 'txt': 'Some str', ... 'idx':5} >>> np.who(d) Name Shape Bytes Type =========================================================== x 2 16 float64 y 3 24 float64 Upper bound on total bytes = 40