operator - method

Array operator -(
  1. dynamic other
)

Implementation

Array operator -(dynamic other) {
  assert(other is Array || other is num);

  var otherArray = (other is num)
      ? Array.fromValue(other.toDouble(), shape: shape)
      : other as Array;

  assert(listEqual(shape.toList(), otherArray.shape.toList()));
  return map((value, pos) => value - otherArray.getValue(pos));
}