Skip to content

Commit

Permalink
Adjustments for Finch.jl#562
Browse files Browse the repository at this point in the history
  • Loading branch information
mtsokol committed May 21, 2024
1 parent 2567a83 commit 0604844
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/finch/julia.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import juliapkg

_FINCH_NAME = "Finch"
_FINCH_VERSION = "0.6.28"
_FINCH_VERSION = "0.6.29"
_FINCH_HASH = "9177782c-1635-4eb9-9bfb-d9dfa25e6bce"
_FINCH_REPO_PATH = os.environ.get("FINCH_REPO_PATH", default=None)

Expand Down
6 changes: 5 additions & 1 deletion src/finch/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,11 @@ def _reduce(x: Tensor, fn: Callable, axis, dtype=None):
else:
result = fn(x._obj)

if jl.isa(result, jl.Finch.Tensor) or jl.isa(result, jl.Finch.LazyTensor):
if (
jl.isa(result, jl.Finch.SwizzleArray) or
jl.isa(result, jl.Finch.Tensor) or
jl.isa(result, jl.Finch.LazyTensor)
):
result = Tensor(result)
else:
result = np.array(result)
Expand Down

0 comments on commit 0604844

Please sign in to comment.