What is the general type for ctypes.Array and np.ndarray? #1290
-
I have a function, and one parameter of it is an array, but it could be either |
Beta Was this translation helpful? Give feedback.
Answered by
hauntsaninja
Nov 15, 2022
Replies: 1 comment
-
A Union is very likely what you want. You could also potentially write a Protocol defining exactly what you expect the shared behaviour to be. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
monchin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A Union is very likely what you want. You could also potentially write a Protocol defining exactly what you expect the shared behaviour to be.