TensorCast.jl

It slices, it dices, it splices!

OTHER License

Stars
135
Committers
9

Bot releases are visible (Hide)

TensorCast.jl - v0.4.8 Latest Release

Published by github-actions[bot] 6 months ago

TensorCast v0.4.8

Diff since v0.4.7

Merged pull requests:

  • allow LazyArrays 1 (#73) (@KristofferC)
TensorCast.jl - v0.4.7

Published by github-actions[bot] 7 months ago

TensorCast v0.4.7

Diff since v0.4.6

Merged pull requests:

  • Add tests based on einops paper (#54) (@RomeoV)

Closed issues:

  • @cast into an SMatrix (#63)
TensorCast.jl - v0.4.6

Published by github-actions[bot] about 2 years ago

TensorCast v0.4.6

Diff since v0.4.5

Closed issues:

  • CUDA array scalar getindex error (#25)
  • scalar getindex when shared index changes order (#28)
  • Repeat example from the docs is broken (#46)
  • Smarter repeat? (#48)

Merged pull requests:

  • Allow repeat-like patterns (#51) (@mcabbott)
TensorCast.jl - v0.4.5

Published by github-actions[bot] about 2 years ago

TensorCast v0.4.5

Diff since v0.4.4

TensorCast.jl - v0.4.4

Published by github-actions[bot] about 2 years ago

TensorCast v0.4.4

Diff since v0.4.3

Closed issues:

  • Ternary operator not understood (#35)
TensorCast.jl - v0.4.3

Published by github-actions[bot] about 3 years ago

TensorCast v0.4.3

Diff since v0.4.2

TensorCast.jl - v0.4.2

Published by github-actions[bot] over 3 years ago

TensorCast v0.4.2

Diff since v0.4.1

Closed issues:

  • Inference failure in broadcasting (#45)
TensorCast.jl - v0.4.1

Published by github-actions[bot] over 3 years ago

TensorCast v0.4.1

Diff since v0.4.0

Closed issues:

  • Problem displaying error message (pretty not defined) (#32)

Merged pull requests:

  • Broadcast a splat (#43) (@mcabbott)
TensorCast.jl - v0.4.0

Published by github-actions[bot] over 3 years ago

TensorCast v0.4.0

Version 0.4 has significant changes:

  • Broadcasting options and index ranges are now written @cast @avx A[i,j] := B[i⊗j] (i ∈ 1:3) instead of @cast A[i,j] := B[i⊗j] i:3, axv (using LoopVectorization.jl for the broadcast, and supplying the range of i).
  • To return an array without naming it, write an underscore @cast _[i] := ... rather than omitting it entirely.
  • Some fairly obscure features have been removed for simplicity: Indexing by an array @cast A[i,k] := B[i,J[k]] and by a range @cast C[i] := f(D[1:3, i]) will no longer work.
  • Some dimension checks are inserted by default; previously the option assert did this.
  • It uses LazyStack.jl to combine handles slices, simplifying earlier code. This is lazier by default, write @cast A[i,k] := log(B[k][i]) lazy=false (with a new keyword option) to glue into an Array before broadcasting.
  • It uses TransmuteDims.jl to handle all permutations & many reshapes. This is lazier by default -- the earlier code sometimes copied to avoid reshaping a PermutedDimsArray. This isn't always faster, though, and can be disabled by lazy=false.

New features in 0.4:

  • Indices can appear ouside of indexing: @cast A[i,j] = i+j translates to A .= axes(A,1) .+ axes(A,2)'
  • The ternary operator ? : can appear on the right, and will be broadcast correctly.
  • All operations should now support OffsetArrays.jl.
  • You can repeat by broadcasting over indices not appearing on the right, such as @cast r[i,(k,j)] = m[i,j]

Diff since v0.3.3

Closed issues:

  • Allow naked indices? (#37)
  • Friendly request for new tag, for compat (#40)

Merged pull requests:

  • Allow indices to appear on RHS (#38) (@mcabbott)
  • Handle OffsetArrays better, even in reshape (#39) (@mcabbott)
TensorCast.jl - v0.3.3

Published by github-actions[bot] over 3 years ago

TensorCast v0.3.3

Diff since v0.3.2

Closed issues:

  • Slightly misleading error (DimensionMismatch) when destination is actually not defined (#30)

Merged pull requests:

  • Fix #32 (#41) (@mcabbott)

And, these are really for version 0.4, not tagged yet:

  • Simplify glue using LazyStack (#17) (@mcabbott)
  • Simplify by not allowing gather operations, nor indexing by ranges (#18) (@mcabbott)
  • CompatHelper: bump compat for "StaticArrays" to "1.0" (#29) (@github-actions[bot])
  • Use TransmuteDims (#31) (@mcabbott)
  • Turn on assertions by default (#33) (@mcabbott)
  • Re-work how options work (#34) (@mcabbott)
  • Change laziness options, introduce a keyword (#36) (@mcabbott)
TensorCast.jl - v0.3.2

Published by github-actions[bot] about 4 years ago

TensorCast v0.3.2

Diff since v0.3.1

Merged pull requests:

  • Allow @cast with a non-reducing function (#27) (@mcabbott)
TensorCast.jl - v0.3.1

Published by github-actions[bot] about 4 years ago

TensorCast v0.3.1

Diff since v0.3.0

Merged pull requests:

  • Do not count empty indices as constant (#26) (@jfeist)
TensorCast.jl - v0.3.0

Published by github-actions[bot] over 4 years ago

TensorCast v0.3.0

Diff since v0.2.2

Version 0.3 does not load LazyArrays (and uses Requires for the interaction). This, and some @nospecialize-ing, cuts the loading time in half.

It also makes @matmul with 3 factors on the right an error, instead of a warning, since I have not fixed the bugs there.

Merged pull requests:

  • Lazy loading of LazyArrays (#23) (@mcabbott)
  • Disable 3-factor @matmul (#24) (@mcabbott)
TensorCast.jl - v0.2.2

Published by github-actions[bot] over 4 years ago

TensorCast v0.2.2

Diff since v0.2.1

Merged pull requests:

  • Install TagBot as a GitHub Action (#12) (@JuliaTagBot)
  • CompatHelper: bump compat for "LazyArrays" to "0.15" (#13) (@github-actions[bot])
  • CompatHelper: bump compat for "LazyStack" to "0.0.6" (#14) (@github-actions[bot])
  • Typo (#20) (@PallHaraldsson)
  • CompatHelper: bump compat for "LazyArrays" to "0.16" (#22) (@github-actions[bot])
TensorCast.jl - v0.2.1

Published by julia-tagbot[bot] over 4 years ago

v0.2.1 (2020-02-03)

Diff since v0.2.0

Closed issues:

  • Issues with Strided (#2)

Merged pull requests:

  • do not collect arrays in orient if the underlying array is a GPUArray (#10) (jfeist)
TensorCast.jl - v0.2.0

Published by julia-tagbot[bot] over 4 years ago

Version 0.2 is a cleaner re-write, with new logic allowing new features. (And maybe new bugs too.)

Added:

  • Slicing can be written A[i,:], which allows for generalised mapslices operations,
    such as @cast V[i,k] := real(eigen(T[:,:,k]).values[i]). This is done by two broadcasting
    operations, the first of which includes getproperty(...,:values) here,
    the second applies real(...).

  • Arrays can be indexed by other arrays, for instance A[i, B[j,k]] is the
    3-tensor A[:,B], where eltype(B)==Int.

  • An array of functions can be applied to other arrays, for instance
    @cast A[i,j,k] := F[i](X[j], y, Z[k]).

  • Updating an array can be written @cast A[i] += f(B[i]) or similarly *= or -=.

  • You can shuffle along a direction by writing A[i,~j],
    in addition to reversing with A[i,-j].

  • Inner indices can now be fixed, for instance A[i][3,k] takes the 3rd row
    of each element of A, which is a vector of matrices.

  • Prime ' now means adjoint, which is complex conjugation when applied to
    numbners A[i,j,k]', but conjugate-transpose when applied to matrices A[:,:,k]'.
    Applied to indices, A[i'] is normalised to the unicode \prime A[i′].

  • Slicing into StaticArrays can be written A{:,j}, always the leftmost indices.
    The fact that such slices have (say) Size(3) can be provided by writing A{:3, j}.
    This allows static-mapslices operations: @cast C[i,j] |= fun(A{:3,j}){i}.

  • Lazy broadcasting @cast A[i] := f(B[i]) lazy will return the BroadcastArray.

  • Zygote gradient definitions for slicing/glueing from SliceMap.jl
    have moved here. Thus mapslices-like operations @cast A[i,j] := f(B[:,j])[i] should be differentiable.

  • Option @cast A[i] := exp(B[i]) avx inserts the @avx macro
    from LoopVectorization.jl.

Removed:

  • @mul replaced by @matmul, which for now requires you to explicitly write what
    indices are summed.

  • This no longer does batched matrix multiplication, @mul Z[i,k,b] := A[i,j,b] * C[j,k,b].
    However OMEinsum now supports this operation.

  • The proofreading / named-tensor functions of @check!, @cast! etc. will move to
    another package.

  • The sign == as in @cast A[i] == B[i] no longer works.
    Using := still returns a view of B when it can do so efficiently,
    and |= still insists on collecting this.

  • Anonymous functions @cast f(A[i]) => B[i] are currently don't work,
    but may be revived in more limited form.

  • You cannot reverse indices on the left A[i,-j] := ... when making a new array A.

  • Staic slicing A[j]{i} no longer requires you to load StaticArrays, this removes
    all optional dependencies.

TensorCast.jl - v0.1.5

Published by julia-tagbot[bot] over 5 years ago

Bugs fixed in @mul.
Broadcasting's orient() now avoids reshaping PermutedDimsArrays.
Added mapslices-like behaviour f(A[i,:])[j].
Added string macros cast" Z_ij := ..." etc.

TensorCast.jl - v0.1.4

Published by julia-tagbot[bot] over 5 years ago

Now allows recursion. Also improvements to lazy broadcasting, behaviour with Strided, and with Diagonal matrices.

TensorCast.jl - v0.1.3

Published by mcabbott over 5 years ago

A[i,j]' is elementwise conjugation,
B[i,i] now means diag(B)[i],
avoid transpose in favour of non-recursive PermuteDimsArray.

TensorCast.jl - v0.1.2

Published by mcabbott over 5 years ago

Anonymous functions, many internal improvements

Package Rankings
Top 9.31% on Juliahub.com
Badges
Extracted from project README
Stable Docs Latest Docs Build Status