Various Numpy operations (correction)

About this page

I will describe some of the functions I investigated.



Extract the part of a specific condition

Extract only True. False corresponds to negation.

array[a == b,:]
array[a != b,:]

Other evaluation formulas can be used.

Reference site python array. Logical operation by grouping elements. not, and, or, xor Extract and delete elements / rows / columns that satisfy the conditions from the NumPy array ndarray

Turn For by the size of the numpy array

for i in range(array.shape[0]):

Reference site Convert list and tuple to each other in Python list (), tuple ()

Recommended Posts

Various Numpy operations (correction)
Various character string operations
Various Python built-in string operations
Summary of various operations in Tensorflow
[Python] Various data processing using Numpy arrays