Skip to content

Commit

Permalink
ENH: datetime: Remove np.datetime_ so autocomplete will find np.datet…
Browse files Browse the repository at this point in the history
…ime64

This is from user feedback, indicating that always having to type the
'6' was very annoying. Unfortunately, there are still the functions
datetime_as_date and datetime_data which prevent the autocomplete from
working right.
  • Loading branch information
Mark Wiebe authored and charris committed Jul 1, 2011
1 parent 861e227 commit e3a8bce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
11 changes: 1 addition & 10 deletions numpy/core/numerictypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,10 @@
int_, uint,
longlong, ulonglong,
single, csingle,
float_, complex_,
longfloat, clongfloat,
datetime_
timedelta_, (this inherits from from signedinteger, as it is
a signed integer with an associated time unit)
As part of the type-hierarchy: xx -- is bit-width
generic
Expand Down Expand Up @@ -405,9 +398,7 @@ def _set_up_aliases():
('longcomplex', 'clongdouble'),
('bool_', 'bool'),
('unicode_', 'unicode'),
('object_', 'object'),
('timedelta_', 'timedelta'),
('datetime_', 'datetime')]
('object_', 'object')]
if sys.version_info[0] >= 3:
type_pairs.extend([('bytes_', 'string'),
('str_', 'unicode'),
Expand Down
2 changes: 1 addition & 1 deletion numpy/core/tests/test_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,7 @@ def test_fromstring_crash(self):
def test_ticket_1539(self):
dtypes = [x for x in np.typeDict.values()
if (issubclass(x, np.number)
and not issubclass(x, np.timedelta_))]
and not issubclass(x, np.timedelta64))]
a = np.array([], dtypes[0])
failures = []
for x in dtypes:
Expand Down

0 comments on commit e3a8bce

Please sign in to comment.