-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TYP: add type hints to functional._dimension #534
Conversation
@@ -11,7 +14,10 @@ | |||
] | |||
|
|||
|
|||
def volume(area, height): | |||
def volume( | |||
area: NDArray[np.float_] | Series, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can do with a bare NDArray
? Since I don't know how to add the same to Series anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you try: Series[np.float_]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
@@ -11,7 +14,10 @@ | |||
] | |||
|
|||
|
|||
def volume(area, height): | |||
def volume( | |||
area: NDArray[np.float_] | Series, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you try: Series[np.float_]
Let's merge then. Can always adjust later if we figure it out. |
I suppose this is how typing in momepy can look? Is that an improvement? Shall we do it?