array-api icon indicating copy to clipboard operation
array-api copied to clipboard

Add support for broadcasting to `linalg.cross`

Open kgryte opened this issue 3 years ago • 0 comments

This PR

  • addresses https://github.com/data-apis/array-api/issues/415 by adding support for broadcasting to linalg.cross. Broadcasting follows NumPy behavior in only broadcasting the non-compute dimensions. With the exception of TensorFlow, this behavior is consistent (or will be after PyTorch addresses its broadcasting behavior) among array libraries.
  • updates vecdot to match linalg.cross in being more explicit that broadcasting only applies to non-broadcast dimensions.
  • brings linalg.cross in line with linear algebra design principles in which linear algebra APIs commonly support batching.

kgryte avatar Apr 18 '22 18:04 kgryte