Friday, September 5, 2025
HomeLanguagesnumpy.who function – Python

numpy.who function – Python

numpy.who() function print the NumPy arrays in the given dictionary.

Syntax : numpy.who(vardict = None)
Parameters :
vardict : [dict, optional] A dictionary possibly containing ndarrays.
Return : Returns ‘None’. If there is no dictionary passed in or vardict is None then returns NumPy arrays in the globals() dictionary.

Code #1 :




# Python program explaining
# numpy.who() function
           
# importing numpy as geek 
import numpy as geek 
  
a = geek.arange(5)
b = geek.ones(10)
  
gfg = geek.who()
     
print (gfg)


Output :

a               5                40               int64
b               10               80               float64

Upper bound on total bytes  =       120
None

 
Code #2 :




# Python program explaining
# numpy.who() function
           
# importing numpy as geek 
import numpy as geek 
  
a = geek.arange(3.0)
b = geek.arange(5.0)
  
gfg = geek.who()
     
print (gfg)


Output :

Name            Shape            Bytes            Type
===========================================================

a               3                24               float64
b               5                40               float64

Upper bound on total bytes  =       64
None
Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32267 POSTS0 COMMENTS
Milvus
81 POSTS0 COMMENTS
Nango Kala
6635 POSTS0 COMMENTS
Nicole Veronica
11801 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11865 POSTS0 COMMENTS
Shaida Kate Naidoo
6752 POSTS0 COMMENTS
Ted Musemwa
7026 POSTS0 COMMENTS
Thapelo Manthata
6703 POSTS0 COMMENTS
Umr Jansen
6720 POSTS0 COMMENTS