numpy.MaskedArray.masked_less() is used to mask an array where the value is less than the specified one This function is a shortcut to
condition = (arr & lt; value).
numpy.ma.masked_less (arr, value, copy = True)
arr: [ ndarray] Input array which we want to mask.
value: [int] It is used to mask the array element which are & lt; value.
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:
| < / tr> |
Input array: [1 2 3 -1 2] Masked array: [- - 2 3 - 2]
Code # 2:
Output: b >
Input array: [5.0e + 08 3.0e-05 -4.5e + 01 4.0e + 04 5.0e + 02] Masked array: [500000000.0 - - 40000.0 500.0]
This is the first book on synthetic data for deep learning, and its extensive coverage could make this book the standard benchmark for synthetic data for years to come. The book can also serve as an i...
Introduction to Machine Learning with Python: A Guide for Data Scientists 1st Edition. Machine learning has become an integral part of many commercial applications and research projects, but this f...
Managing and analyzing data have always offered the greatest benefits and the greatest challenges for organizations of all sizes and across all industries. Businesses have long struggled with finding ...
The rate at which we produce data is growing steadily, thus creating even larger streams of continuously evolving data. Online news, micro-blogs, search queries are just a few examples of these contin...