About 5,280,000 results
Open links in new tab
  1. Select elements of numpy array via boolean mask array

    Select elements of numpy array via boolean mask array Asked 12 years, 1 month ago Modified 6 years, 2 months ago Viewed 139k times

  2. How to mask a list using boolean values from another list

    How to mask a list using boolean values from another list Asked 7 years ago Modified 3 years, 2 months ago Viewed 22k times

  3. Numpy 2-D array boolean masking - Stack Overflow

    Aug 26, 2018 · Another way to apply a general boolean 2D mask on a 2D numpy array is the following: Use matrix element-wise multiplication:

  4. Filtering polars dataframe by row with boolean mask

    Mar 17, 2025 · I'm trying to filter a Polars dataframe by using a boolean mask for the rows, which is generated from conditions on an specific column using:

  5. pandas DataFrame set value on boolean mask - Stack Overflow

    May 29, 2015 · 27 You can't use the boolean mask on mixed dtypes for this unfortunately, you can use pandas where to set the values:

  6. How to turn a boolean array into index array in numpy

    Jul 29, 2016 · Is there an efficient Numpy mechanism to retrieve the integer indexes of locations in an array based on a condition is true as opposed to the Boolean mask array? For example: …

  7. Boolean masking on multiple axes with numpy - Stack Overflow

    Feb 18, 2017 · But trying to broadcast boolean arrays like this does not work: X[mask1[:,None], mask2] But that reference section says: Combining multiple Boolean indexing arrays or a …

  8. using a two-dimensional boolean array as a mask in pandas

    May 19, 2020 · Using boolean series as masks is very handy in pandas. Was wondering, if and how one could generate two-dimensional boolean arrays as masks for e.g. the where () or …

  9. How to apply mask to a tensor and keep its original shape

    Apr 15, 2019 · I have two tensors: one containing data and the other mask of boolean values. I would like to set all values in data tensor to zero, if boolean values are False, while keeping …

  10. Python: Elegant and efficient ways to mask a list

    Apr 23, 2012 · Python: Elegant and efficient ways to mask a list Asked 13 years, 8 months ago Modified 4 years, 2 months ago Viewed 112k times