Skip to content

Commit

Permalink
Fix sparse COO creation
Browse files Browse the repository at this point in the history
  • Loading branch information
kbattocchi committed Jun 9, 2020
1 parent 481fad3 commit b1fec80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions econml/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,8 +708,9 @@ def filter_inds(coords, data, n):
for (c, d) in l:
results[tuple(c[i] for i in coordMap)] += d

return sp.COO(np.array([k for k in results.keys()]).T,
np.array([v for v in results.values()]),
return sp.COO(np.array(list(results.keys())).T if results else
np.empty((len(outputs), 0)),
np.array(list(results.values())),
[arrs[indMap[c][0][0]].shape[indMap[c][0][1]] for c in outputs])


Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ install_requires =
scipy != 1.4.0
scikit-learn ~= 0.21.0
keras
sparse != 0.10
sparse
tensorflow == 1.*
joblib >= 0.13.0
numba != 0.42.1
Expand Down

0 comments on commit b1fec80

Please sign in to comment.