-
Notifications
You must be signed in to change notification settings - Fork 63
Closed
Description
Noted by @leburgel:
When contracting a network that results in a scalar, currently ncon
does not insert a final call to tensorscalar
. As such the following (unintuitive) behaviour is happening:
julia> using TensorOperations
julia> A = rand(2,2);
julia> ncon([A, A], [[1, 2], [1, 2]])
0-dimensional Array{Float64, 0}:
1.42602
It is probably easier to just catch this and wrap the result in tensorscalar
, as ncon
is inherently type-unstable anyways, this should not make a huge difference.
Metadata
Metadata
Assignees
Labels
No labels