summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Hunt <alexander.l.hunt951@gmail.com>2021-03-29 09:51:04 -0400
committerAlexander Hunt <alexander.l.hunt951@gmail.com>2021-03-29 09:51:04 -0400
commita8662bebf3935b64b1e1d2aaf35a1e945fbf0845 (patch)
tree77cdefb6765ddc73a5ffd07e8ce58dd3f01214d2
parentf01ea33f4ed510bf4479af708b43246b351a99a7 (diff)
parent3eabb1e37b8e88e5ea12492dadd226d8f3984266 (diff)
downloadnumpy-a8662bebf3935b64b1e1d2aaf35a1e945fbf0845.tar.gz
Merge branch 'main' of github.com:oscar139/numpy into main
-rw-r--r--numpy/__init__.pyi6
1 files changed, 2 insertions, 4 deletions
diff --git a/numpy/__init__.pyi b/numpy/__init__.pyi
index e2a99bdbe..0009d5fd9 100644
--- a/numpy/__init__.pyi
+++ b/numpy/__init__.pyi
@@ -2537,8 +2537,8 @@ class object_(generic):
object0 = object_
-#Added Protocol to typecheck for day, month, year property to be used in
-#datetime64 constructor per Issue #18640 and BvB93s recommendation
+# The `datetime64` constructors requires an object with the three attributes below,
+# and thus supports datetime duck typing
class _DatetimeScalar(Protocol):
@property
def day(self) -> int: ...
@@ -2549,8 +2549,6 @@ class _DatetimeScalar(Protocol):
class datetime64(generic):
- #Replaced dt.datetime with _DatetimeScalar per issue #18640 and
- #BvB93s recommendation
@overload
def __init__(
self,