Skip to content

Upgrading einops 0.4 to 0.5

Safe0.4.1 → 0.5.0New5Fixed2Other4

SafeUpgrade verdict

Only new features and fixes in this range.

  • Nothing in this range needs changes to your code. It adds features and fixes.
Nothing to change

No breaking, platform, security or deprecated items in this range.

Requires Python >=3.7 from 0.5.0 (none stated before).

Nothing in this upgrade needs a code or configuration change.

Generated by DepDelta from published Python source. Not mixed with prose notes.

  • added: export einsum
  • changed: function parse_shape(x, pattern: str) → function parse_shape(x, pattern: str) -> dict
  • changed: function rearrange(tensor: Tensor, pattern: str, **axes_length: int) -> Tensor | (tensor: List[Tensor], pattern: str, **axes_lengths: int) -> Tensor → function rearrange(tensor: Union[Tensor, List[Tensor]], pattern: str, **axes_lengths) -> Tensor
  • added: function einsum(tensor: Tensor, pattern: str) -> Tensor | (tensor1: Tensor, tensor2: Tensor, pattern: str) -> Tensor | (tensor1: Tensor, tensor2: Tensor, tensor3: Tensor, pattern: str) -> Tensor | (tensor1: Tensor, tensor2: Tensor, tensor3: Tensor, tensor4: Tensor, pattern: str) -> Tensor
  • added: class CompositionDecomposition
  • added: class IndexingFormula
  • added: constructor CompositionDecomposition(decomposed_shape: List[str], composed_shape: List[List[str]])
  • added: constructor IndexingFormula(pattern: str)
  • added: function arange_at_position(xp, n_axes, axis, axis_len, device=…)
  • added: function einindex(pattern: str, arr: T, /, ind: Union[T, List[T]])
  • added: function test_composition_and_decomposition()
  • added: function test_multidimensional_indexing()
  • added: function test_reverse_indexing()
  • added: function test_simple_indexing()
  • added: method CompositionDecomposition.compose(x, known_axes_lengths: dict[str, int])
  • added: method CompositionDecomposition.decompose(x, known_axes_lengths: dict[str, int])
  • added: method IndexingFormula.apply_to_array_api(arr: T, ind: Union[T, List[T]])
  • added: variable T
  • added: class EinMix(nn.Module, _EinmixMixin)
  • added: class Rearrange(nn.Module)
  • added: class Reduce(nn.Module)
  • added: field EinMix.bias_shape: Optional[str]
  • added: field EinMix.pattern: str
  • added: field EinMix.sizes: dict
  • added: field EinMix.weight_shape: str
  • added: field Rearrange.pattern: str
  • added: field Rearrange.sizes: dict
  • added: field Reduce.pattern: str
  • added: field Reduce.reduction: str
  • added: field Reduce.sizes: dict
  • added: method EinMix.setup()
  • added: method Rearrange.setup()
  • added: method Reduce.setup()
  • added: class EinMix(_EinmixMixin, flow.nn.Module)
  • added: class Rearrange(RearrangeMixin, flow.nn.Module)
  • added: class Reduce(ReduceMixin, flow.nn.Module)
  • added: method EinMix.forward(input)
  • added: method Rearrange.forward(input)
  • added: method Reduce.forward(input)
  • changed: constructor ParsedExpression(expression, *, allow_underscore: bool=…) → constructor ParsedExpression(expression, *, allow_underscore: bool=…, allow_duplicates: bool=…)