Error in using np.compress()

np.compress this is the code
this may be very basic , but please help
this is the error :

IndexError                                Traceback (most recent call last)
/tmp/ipykernel_73/3244168306.py in <module>
      1 # Example 1 - working
----> 2 a = np.compress((array > 0)[1], array, axis=0)
      3 print("\nSliced array : \n", a)

<__array_function__ internals> in compress(*args, **kwargs)

/opt/conda/lib/python3.9/site-packages/numpy/core/fromnumeric.py in compress(condition, a, axis, out)
   2035 
   2036     """
-> 2037     return _wrapfunc(a, 'compress', condition, axis=axis, out=out)
   2038 
   2039 

/opt/conda/lib/python3.9/site-packages/numpy/core/fromnumeric.py in _wrapfunc(obj, method, *args, **kwds)
     56 
     57     try:
---> 58         return bound(*args, **kwds)
     59     except TypeError:
     60         # A TypeError occurs if the object does have such a method in its

IndexError: index 3 is out of bounds for axis 0 with size 3