Skip to content

Commit

Permalink
use getblockunsafe from SymmetricTensors
Browse files Browse the repository at this point in the history
  • Loading branch information
kdomino committed Sep 11, 2017
1 parent aee397c commit a31d6f1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Cumulants.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module Cumulants
using SymmetricTensors
using NullableArrays
using Iterators
#using Iterators
using Combinatorics
import SymmetricTensors: indices, ind2range, sizetest
import SymmetricTensors: indices, ind2range, sizetest, getblockunsafe
import Distributions: moment

#calculates moments and cumulants using block structures (SymmetricTensors)
Expand Down
2 changes: 1 addition & 1 deletion src/cumulant.jl
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ function accesscum{T <: AbstractFloat}(mulind::Tuple,
blocks = Array(Array{T}, part.npart)
sq = cum[1].sqr || !(cum[1].bln in mulind)
for k in 1:part.npart
data = cum[part.subsetslen[k]][mulind[part.part[k]]]
data = getblockunsafe(cum[part.subsetslen[k]], mulind[part.part[k]])
if sq
@inbounds blocks[k] = data
else
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ using SymmetricTensors
using Cumulants
using Distributions
using NullableArrays
using Iterators
#using Iterators
import Cumulants: indpart, momentblock, blockel, accesscum, outprodblocks,
IndexPart, outerprodcum, naivemoment, pyramidmoment, pyramidcumulants, mom2cums,
usebl
Expand Down
2 changes: 0 additions & 2 deletions test/testondata.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

using JLD
using Cumulants
addprocs(4)
@everywhere using Cumulants

function main()
d = try load("data/datafortests.jld")
Expand Down

0 comments on commit a31d6f1

Please sign in to comment.