Monday, October 6, 2025
HomeLanguagesnumpy.ma.flatnotmasked_contiguous() function | Python

numpy.ma.flatnotmasked_contiguous() function | Python

numpy.ma.flatnotmasked_contiguous() function find contiguous unmasked data in a masked array along the given axis. 
 

Syntax : numpy.ma.flatnotmasked_contiguous(arr)
Parameters : 
arr : [ array_like] The input array.
Return : [slice_list ] A sorted sequence of slice objects (start index, end index).
 

Code #1 : 
 

Python3




# Python program explaining
# numpy.ma.flatnotmasked_contiguous() function
 
# importing numpy as geek 
# and numpy.ma module as ma
import numpy as geek
import numpy.ma as ma
 
arr = geek.ma.arange(8)
 
gfg = geek.ma.flatnotmasked_contiguous(arr)
 
print (gfg)


Output : 
 

slice(0, 8, None)

  
Code #2 : 
 

Python3




# Python program explaining
# numpy.ma.flatnotmasked_contiguous() function
 
# importing numpy as geek 
# and numpy.ma module as ma
import numpy as geek
import numpy.ma as ma
 
arr = geek.ma.arange(12)
 
gfg = geek.ma.flatnotmasked_contiguous(arr)
 
print (gfg)


Output : 
 

slice(0, 12, None)

 

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

Most Popular

Dominic
32338 POSTS0 COMMENTS
Milvus
86 POSTS0 COMMENTS
Nango Kala
6707 POSTS0 COMMENTS
Nicole Veronica
11871 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11936 POSTS0 COMMENTS
Shaida Kate Naidoo
6825 POSTS0 COMMENTS
Ted Musemwa
7089 POSTS0 COMMENTS
Thapelo Manthata
6779 POSTS0 COMMENTS
Umr Jansen
6781 POSTS0 COMMENTS