Skip to content

Instantly share code, notes, and snippets.

@knedlsepp
Created August 29, 2019 08:39
Show Gist options
  • Save knedlsepp/d8343867a47d220000c8aad4b2f51d63 to your computer and use it in GitHub Desktop.
Save knedlsepp/d8343867a47d220000c8aad4b2f51d63 to your computer and use it in GitHub Desktop.
--- a/quantities/dimensionality.py
+++ b/quantities/dimensionality.py
@@ -329,6 +329,11 @@ p_dict[np.floor] = _d_copy
p_dict[np.fix] = _d_copy
p_dict[np.ceil] = _d_copy
+def _d_clip(a1, a2, a3, q):
+ return q.dimensionality
+
+p_dict[np.core.umath.clip] = _d_clip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment