L, P, F, etc. are second order tensors
This commit is contained in:
parent
575c84ad86
commit
6f19113072
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
||||||
Subproject commit a949f5417762bddc551bf99f19a26ea2bdb4e5b4
|
Subproject commit 174ecac2d3ab7596bdb60184d6bb9e1a52cb7378
|
|
@ -482,20 +482,13 @@ subroutine getMaskedTensor(values,mask,tensor)
|
||||||
|
|
||||||
|
|
||||||
values = 0.0
|
values = 0.0
|
||||||
if (tensor%length == 9) then ! temporary support for deprecated 1D tensor
|
do i = 1,3
|
||||||
do i = 1,9
|
row => tensor%get(i)
|
||||||
mask((i-1)/3+1,mod(i-1,3)+1) = tensor%get_asString(i) /= 'x'
|
do j = 1,3
|
||||||
if (mask((i-1)/3+1,mod(i-1,3)+1)) values((i-1)/3+1,mod(i-1,3)+1) = tensor%get_asFloat(i)
|
mask(i,j) = row%get_asString(j) /= 'x'
|
||||||
|
if (mask(i,j)) values(i,j) = row%get_asFloat(j)
|
||||||
enddo
|
enddo
|
||||||
else
|
enddo
|
||||||
do i = 1,3
|
|
||||||
row => tensor%get(i)
|
|
||||||
do j = 1,3
|
|
||||||
mask(i,j) = row%get_asString(j) /= 'x' ! ToDo change to np.masked behavior
|
|
||||||
if (mask(i,j)) values(i,j) = row%get_asFloat(j)
|
|
||||||
enddo
|
|
||||||
enddo
|
|
||||||
endif
|
|
||||||
|
|
||||||
end subroutine
|
end subroutine
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue