Skip to content

Commit 7e43710

Browse files
committed
add require shape to maximum
1 parent 91b9aa3 commit 7e43710

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

multik-api/src/main/kotlin/org/jetbrains/kotlinx/multik/ndarray/operations/IteratingNDArray.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ public fun <T: Number, D : Dimension> MultiArray<T, D>.minimum(other: MultiArray
814814
* Returns the element-wise maximum of array elements for [this] and [other].
815815
*/
816816
public fun <T: Number, D : Dimension> MultiArray<T, D>.maximum(other: MultiArray<T, D>): NDArray<T, D> {
817-
requireArraySizes(this.size, other.size)
817+
requireEqualShape(this.shape, other.shape)
818818
val ret = (this as NDArray).deepCopy()
819819
when (dtype) {
820820
DataType.DoubleDataType -> (ret as NDArray<Double, D>).commonAssignOp(other.iterator() as Iterator<Double>) { a, b -> max(a, b) }

0 commit comments

Comments
 (0)