File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
1
name = " TensorOperations"
2
2
uuid = " 6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2"
3
3
authors = [" Jutho Haegeman" ]
4
- version = " 3.2.2 "
4
+ version = " 3.2.3 "
5
5
6
6
[deps ]
7
7
LinearAlgebra = " 37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Original file line number Diff line number Diff line change @@ -80,21 +80,23 @@ function getrhs(ex::Expr)
80
80
end
81
81
end
82
82
83
- # get all the tensor objects in a tensor expression (not a definition or assignment)
84
- function gettensorobjects (ex)
83
+ # get all the tensors and tensor objects in a tensor expression (not a definition or assignment)
84
+ function gettensors (ex)
85
85
if istensor (ex)
86
- Any[gettensorobject (ex) ]
86
+ Any[ex ]
87
87
elseif istensorexpr (ex)
88
88
list = Any[]
89
89
for e in ex. args
90
- append! (list, gettensorobjects (e))
90
+ append! (list, gettensors (e))
91
91
end
92
92
return list
93
93
else
94
94
return Any[]
95
95
end
96
96
end
97
97
98
+ gettensorobjects (ex) = gettensorobject .(gettensors (ex))
99
+
98
100
# get all the existing tensor objects which are inputs (i.e. appear in the rhs of assignments and definitions)
99
101
function getinputtensorobjects (ex)
100
102
list = Any[]
You can’t perform that action at this time.
0 commit comments