-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ufuncs: Added subtract support for 2D views (#254)
* ufuncs: Added subtract support for 2D views * ufuncs: fixed type in 2d subtract implementation * tests: added test for subtract 2d * tests: forgot to uncomment rest of the ufunc test cases xD * ufuncs: added basic broadcast - to test yet * ufuncs: docstring and comments cleaned * ufuncs: added scalar -> 2d broadcast * ufuncs: Added scalar subtract impls * tests: removed keyword arguments because of updated subtract protocal (accepts scalars now) * Ufuncs: various small fixes after testing __init__.py: broadcast_view now exposed as util * ufuncs.py: Fixed minor bug in subtract * test_ufuncs.py: Added tests for subtract * ufuncs, removed asserts so pre_compile_ufuncs is not interrupted * ufuncs.py: Same size arrays are not broadcastable and will return False now * ufuncs.py: fixed bug (incorrect if condition when removing assert) * pre_compile_ufuncs: broadcast throws ValueError exception when called incorrectly. ignoring this raise * ufuncs.py: Updated subtract to bypass broadcast guard if views are same dims exactly (broadcasting was updated to be incompatible explicitly with same dims) * Addressed comments about indexing and logic * Removed team policy in favor of for loops * Added broadcast to filter list * pre_compile_ufuncs: fixed wrong logic for filtering broadcast
- Loading branch information
1 parent
9664cb7
commit 6df6b49
Showing
4 changed files
with
312 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.