##### Identifying consecutive masked values in a 3D data array
 Identifying consecutive masked values in a 3D data array perfringo Da Bishop Posts: 1,512 Threads: 7 Joined: Jun 2018 Reputation: 150 Jan-21-2020, 06:21 AM 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) ``` I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame. Reply chai0404 Programmer named Tim Posts: 12 Threads: 4 Joined: Jan 2020 Reputation: 0 Jan-31-2020, 11:36 PM 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? Reply perfringo Da Bishop Posts: 1,512 Threads: 7 Joined: Jun 2018 Reputation: 150 Feb-01-2020, 12:59 PM You should provide (sample) data and your own effort solving it before seeking for help. I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame. Reply

 Possibly Related Threads… Thread Author Replies Views Last Post Calculating consecutive days in a 3D array chai0404 0 381 Aug-27-2020, 10:28 PM Last Post: chai0404 Adding data in 3D array from 2D numpy array asmasattar 0 375 Jul-23-2020, 10:55 AM Last Post: asmasattar Comparing and Identifying ID with Percentage jonatasflausino 1 505 Jun-23-2020, 06:44 PM Last Post: hussainmujtaba Read json array data by pandas vipinct 0 360 Apr-13-2020, 02:24 PM Last Post: vipinct Creating look up table/matrix from 3d data array chai0404 3 502 Apr-09-2020, 04:53 AM Last Post: buran Replacing values for specific columns in Panda data structure Padowan 1 12,694 Nov-27-2017, 08:21 PM Last Post: Padowan Match two data sets based on item values klllmmm 7 3,105 Mar-29-2017, 02:33 PM Last Post: zivoni how to select particular rows data from a array raady07 3 2,065 Mar-06-2017, 02:21 AM Last Post: raady07 Identifying items in a csv file that also appear in a Text extract Jaynorth 17 7,728 Sep-21-2016, 10:51 PM Last Post: Jaynorth

Forum Jump:

### User Panel Messages

##### Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020