numpy.MaskedArray.masked_inside() is used to mask an array within a given interval. This function is a shortcut to masked_where, where the condition is true for arr within the interval
[v1, v2] (v1 & lt; = arr & lt; = v2) , Boundaries v1 and v2 can be specified in any order. p>
numpy.ma.masked_inside (arr, v1, v2, copy = True)
arr: [ndarray] Input array which we want to mask.
v1, v2: [int] Lower and upper range.
copy: [bool] If True (default) make a copy of arr in the result. If False modify arr in place and return a view.
Return: [MaskedArray] The resultant array after masking.
Code # 1:
Input array: [5.0e + 08 3.0e-05 -4.5e + 01 4.0e + 04 5.0e + 02] Masked array: [- 3e-05 -45.0 - -]
Pandas for Everyone: Python Data Analysis (Addison-Wesley Data & Analytics Series), 1st Edition. Pandas for Everyone brings together the practical knowledge and insights you need to solve real-worl...
For courses in business intelligence or decision support systems. A managerial approach to understanding business intelligence systems. To help future managers use and understand analytics, Business...
I have developed this book to investigate Mesos-based cluster development and integration. I found that data center operating system (DCOS; and it’s command-line interface [CLI]) was a natural progr...
We are experiencing a renaissance of artificial intelligence, and everyone and their neighbor wants to be a part of this movement. That’s quite likely why you are browsing through this book. There a...