Python Forum
Identifying consecutive masked values in a 3D data array - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: Identifying consecutive masked values in a 3D data array (/thread-23694.html)

Pages: 1 2


RE: Identifying consecutive masked values in a 3D data array - perfringo - Jan-21-2020

Assuming that you have function 'consecutives' which works as expected on 1D arrays just use it along the axis of 2D array:

np.apply_along_axis(consecutives, 2, array)



RE: Identifying consecutive masked values in a 3D data array - chai0404 - Jan-31-2020

Many thanks for your help!

I have a follow-up question -
How can I identify the number of consecutive events, say for a particular month or season, for a 3d data array with longitude, latitude and time?


RE: Identifying consecutive masked values in a 3D data array - perfringo - Feb-01-2020

You should provide (sample) data and your own effort solving it before seeking for help.