diff options
author | czgdp1807 <gdp.1807@gmail.com> | 2021-08-07 11:05:40 +0530 |
---|---|---|
committer | czgdp1807 <gdp.1807@gmail.com> | 2021-08-07 11:05:40 +0530 |
commit | 321e028b90526ec40df281ae543f18aa4434bcd3 (patch) | |
tree | 76267d734de77cc1a045ec6aac6a66d8bbf342f3 /numpy/_globals.py | |
parent | 3dcf3a9f6eeabdef0c73e0262fc329bec7a23aa5 (diff) | |
download | numpy-321e028b90526ec40df281ae543f18aa4434bcd3.tar.gz |
Shifted to CopyMode to np.array_api
Diffstat (limited to 'numpy/_globals.py')
-rw-r--r-- | numpy/_globals.py | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/numpy/_globals.py b/numpy/_globals.py index b7a399a79..97007b51e 100644 --- a/numpy/_globals.py +++ b/numpy/_globals.py @@ -15,11 +15,9 @@ That was not the case when the singleton classes were defined in the numpy motivated this module. """ -import enum - __ALL__ = [ 'ModuleDeprecationWarning', 'VisibleDeprecationWarning', - '_NoValue', 'CopyMode' + '_NoValue' ] @@ -91,23 +89,4 @@ class _NoValueType: return "<no value>" -_NoValue = _NoValueType() - -class CopyMode(enum.Enum): - - ALWAYS = True - IF_NEEDED = False - NEVER = 2 - - def __bool__(self): - # For backwards compatiblity - if self == CopyMode.ALWAYS: - return True - - if self == CopyMode.IF_NEEDED: - return False - - raise TypeError(f"{self} is neither True nor False.") - - -CopyMode.__module__ = 'numpy' +_NoValue = _NoValueType()
\ No newline at end of file |