Broadcasting updates, binominal random initializer and bug fixes #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Broadcast improvements
The commits below basically implements broadcasting for NDArray_Greater, NDArray_LessEqual, NDArray_Equal and NDArray_Maximum. It also upgrades the NDArray_Broadcast function to support more variations.
feat: NDArray_IsBroadcastable and NDArray_Broadcast now properly hand…
feat: NDArray_Greater broadcast.
feat: NDArray_LessEqual and NDArray_GreaterEqual broadcast.
fix: NDArray_Maximum not using broadcasted variables.
Bug fixes
NDArray methods were ignoring the object type and was causing segmentation fault when a incompatible object was passed as an argument. This checks if the input object is actually an NDArray (just reusing the GDImage object checking)
fix: ZVAL_TO_NDARRAY not checking class name. Causing segmentation fa…
Slicing was broken because of signature mismatch
fix: zpp mismatch arginfo in NDArray_Slice
New methods
Binominal random initializer
feat: Implemented binominal random initializer.
NDArray::expand_dims to expand the shape of an array.
feat: NDArray::expand_dims implementation.