code: public static void replaceWhere(@NonNull INDArray to, @NonNull INDArray from, @NonNull Condition condition) {
          if (!(condition instanceof BaseCondition))
              throw new UnsupportedOperationException("Only static Conditions are supported");
  
          if (to.length() != from.length())
              throw new IllegalStateException("Mis matched length for to and from");
  
          Nd4j.getExecutioner().exec(new CompareAndReplace(to, from, condition));
      }
docs: This method does element-wise comparison for 2 equal-sized matrices, for each element that matches Condition
  
  @param to
  @param from
  @param condition