You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -131,7 +131,6 @@ Each provided ndarray should be an object with the following properties:
131
131
132
132
-`condition` ndarray must be a `boolean` or `uint8` ndarray.
133
133
-`condition`, `x`, `y`, and `out` ndarrays must have the same shape.
134
-
-`x` and `y` must have the same data type.
135
134
- The function **mutates** the input ndarrays shapes and strides if necessary.
136
135
- For very high-dimensional ndarrays which are non-contiguous, one should consider copying the underlying data to contiguous memory before conditionally assigning elements in order to achieve better performance.
thrownewError(format('invalid arguments. Arrays must have the same number of dimensions (i.e., same rank). ndims(c) == %d. ndims(x) == %d. ndims(y) == %d. ndims(o) == %d.',shc.length,shx.length,shy.length,sho.length));
335
344
}
336
345
337
-
if(x.dtype!==y.dtype){
338
-
thrownewError(format('invalid arguments. Input arrays must have the same data type. x.dtype=%s, y.dtype=%s',x.dtype,y.dtype));
// Determine whether we are casting a real data type to a complex data type and we need to use a specialized accessor (note: we don't support the other way, complex-to-real, as this is not an allowed (mostly) safe cast; note: we cannot create a specialized view for assigning only real components, as the imaginary component for each element in `y` also needs to be set to zero and while we could perform two passes, it's not clear it's worth the effort)...
thrownewError(format('invalid arguments. Arrays must have the same number of dimensions (i.e., same rank). ndims(c) == %d. ndims(x) == %d. ndims(y) == %d. ndims(o) == %d.',shc.length,shx.length,shy.length,sho.length));
374
-
}
385
+
375
386
// Determine whether we can avoid iteration altogether...
376
387
if(ndims===0){
377
388
if(hasAccessors(c,x,y,o)){
@@ -439,15 +450,15 @@ function where( arrays ) {
439
450
440
451
// Determine whether we can avoid blocked iteration...
0 commit comments