summaryrefslogtreecommitdiff
path: root/numpy/core/_internal.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core/_internal.py')
-rw-r--r--numpy/core/_internal.py30
1 files changed, 0 insertions, 30 deletions
diff --git a/numpy/core/_internal.py b/numpy/core/_internal.py
index 5298f412b..a5b6d117a 100644
--- a/numpy/core/_internal.py
+++ b/numpy/core/_internal.py
@@ -166,36 +166,6 @@ def _split(input):
return newlist
-format_datetime = re.compile(asbytes(r"""
- (?P<typecode>M8|m8|datetime64|timedelta64)
- ([[]
- ((?P<num>\d+)?
- (?P<baseunit>Y|M|W|B|D|h|m|s|ms|us|ns|ps|fs|as)
- (/(?P<den>\d+))?
- []])
- (//(?P<events>\d+))?)?"""), re.X)
-
-# Return (baseunit, num, den, events), datetime
-# from date-time string
-def _datetimestring(astr):
- res = format_datetime.match(astr)
- if res is None:
- raise ValueError("Incorrect date-time string.")
- typecode = res.group('typecode')
- datetime = (typecode == asbytes('M8') or typecode == asbytes('datetime64'))
- defaults = [asbytes('us'), 1, 1, 1]
- names = ['baseunit', 'num', 'den', 'events']
- func = [bytes, int, int, int]
- dt_tuple = []
- for i, name in enumerate(names):
- value = res.group(name)
- if value:
- dt_tuple.append(func[i](value))
- else:
- dt_tuple.append(defaults[i])
-
- return tuple(dt_tuple), datetime
-
format_re = re.compile(asbytes(r'(?P<order1>[<>|=]?)(?P<repeats> *[(]?[ ,0-9]*[)]? *)(?P<order2>[<>|=]?)(?P<dtype>[A-Za-z0-9.]*)'))
# astr is a string (perhaps comma separated)