Friday, September 5, 2025
HomeLanguagesnumpy.byte_bounds() function – Python

numpy.byte_bounds() function – Python

numpy.byte_bounds() function returns pointers to the end-points of an array.

Syntax : numpy.byte_bounds(arr)
Parameters :
arr : [ndarray] Input array.
Return : [tuple of 2 integers] The first integer is the first byte of the array, the second integer is just past the last byte of the array. If arr is not contiguous it will not use every byte between the (low, high) values.

Code #1 :




# Python program explaining
# numpy.byte_bounds() function
            
# importing numpy as geek 
import numpy as geek 
   
arr = geek.eye(2, dtype = 'f')
  
gfg = geek.byte_bounds(arr)
      
print (gfg)


Output :

(37062512, 37062528)

 
Code #2 :




# Python program explaining
# numpy.byte_bounds() function
            
# importing numpy as geek 
import numpy as geek 
   
arr = geek.eye(2)
  
gfg = geek.byte_bounds(arr)
      
print (gfg)


Output :

(30421344, 30421376)
Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32264 POSTS0 COMMENTS
Milvus
81 POSTS0 COMMENTS
Nango Kala
6634 POSTS0 COMMENTS
Nicole Veronica
11801 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11863 POSTS0 COMMENTS
Shaida Kate Naidoo
6750 POSTS0 COMMENTS
Ted Musemwa
7025 POSTS0 COMMENTS
Thapelo Manthata
6701 POSTS0 COMMENTS
Umr Jansen
6718 POSTS0 COMMENTS