MCPcopy Index your code
hub / github.com/numpy/numpy / _MaskedPrintOption

Class _MaskedPrintOption

numpy/ma/core.py:2441–2486  ·  view source on GitHub ↗

Handle the string used to represent missing data in a masked array.

Source from the content-addressed store, hash-verified

2439
2440
2441class _MaskedPrintOption:
2442 """
2443 Handle the string used to represent missing data in a masked array.
2444
2445 """
2446
2447 def __init__(self, display):
2448 """
2449 Create the masked_print_option object.
2450
2451 """
2452 self._display = display
2453 self._enabled = True
2454
2455 def display(self):
2456 """
2457 Display the string to print for masked values.
2458
2459 """
2460 return self._display
2461
2462 def set_display(self, s):
2463 """
2464 Set the string to print for masked values.
2465
2466 """
2467 self._display = s
2468
2469 def enabled(self):
2470 """
2471 Is the use of the display value enabled?
2472
2473 """
2474 return self._enabled
2475
2476 def enable(self, shrink=1):
2477 """
2478 Set the enabling shrink to `shrink`.
2479
2480 """
2481 self._enabled = shrink
2482
2483 def __str__(self):
2484 return str(self._display)
2485
2486 __repr__ = __str__
2487
2488
2489# if you single index into a masked location you get this object.

Callers 1

core.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…