Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add docs
  • Loading branch information
Ryan Soklaski committed Sep 4, 2021
commit fa84b4e44bcceb9ccb4eb3ca9c86ba74b9e8d74d
2 changes: 2 additions & 0 deletions src/mygrad/tensor_manip/array_shape/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@


class _PreservesOrder(Operation):
"""Base class for operations that preserve an array's size
and flat-iteration element ordering"""
def backward_var(self, grad: np.ndarray, index: int, **kwargs) -> np.ndarray:
(a,) = self.variables
return np.reshape(grad, a.shape)
Expand Down