check Shape
Checks if the shape of the array matches the shape of another array.
Return
the other array if the shapes match, cast to F64FlatArray if both arrays are flat
Parameters
other
the other array
Throws
Illegal Argument Exception
if the shapes do not match