Oct-27-2020, 03:42 PM
Hi, I have this matlab code
A(A> numel(B)) = [ ];
where A and B are two arrays.
The code above, as I interpreted it, removes some of the elements in the A array based on the condition in the brackets.
I want to do the same in Python.
In an easier Matlab case like A(B) = [ ]
I simply would do
Would something like
Thank you.
A(A> numel(B)) = [ ];
where A and B are two arrays.
The code above, as I interpreted it, removes some of the elements in the A array based on the condition in the brackets.
I want to do the same in Python.
In an easier Matlab case like A(B) = [ ]
I simply would do
A= np.delete(A, B, axis = 0)What about the above condition?
Would something like
A= np.delete(A, A > B.size, axis = 0)be correct?
Thank you.