I am trying to take an array and break it into multiple subarrays when certain numbers occur.

List = [25. 13. 13. 13. 13. 1. 13. 13. 13. 13. 23. 13. 13. 13. 25. 13. 13. 1. 13. 23.]

When done I should have: array1[25. 13. 13. 13. 13.] array2[1. 13. 13. 13. 13.] array3[23. 13. 13. 13.]
array4[25. 13. 13.] array6[1. 13. 13.]

So far I can get it to split based on 1 value using:
splitArray = numpy.split(list, where(list[0:] == 25)[0]

output: array1[25. 13. 13. 13. 13. 1. 13. 13. 13. 13. 23. 13. 13. 13.] array2 [25. 13. 13. 1. 13. 23.]

But I cant get it to work expanding the values to split on.

I’ve tried
splitArray = numpy.split(list, where(list[0:] == 25 or 1 or 23)[0]
and
splitArray = numpy.split(list, where(list[0:] == 25) or where(list[0:] == 1)or where(list[0:] == 23)[0]
and
splitArray = numpy.split(list, where(list[0:] == 25)[0] or where(list[0:] == 1)[0] or where(list[0:] == 23)[0]

New contributor

TItus McGill is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.