Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
kmp5VT committed Sep 7, 2023
1 parent 41e292d commit 0de7b94
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 1 addition & 3 deletions NDTensors/src/blocksparse/blocksparse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ end
function BlockSparse(
datatype::Type{<:AbstractArray}, blockoffsets::BlockOffsets, dim::Integer; vargs...
)
return BlockSparse(
generic_zeros(datatype, dim), blockoffsets; vargs...
)
return BlockSparse(generic_zeros(datatype, dim), blockoffsets; vargs...)
end

function BlockSparse(
Expand Down
10 changes: 6 additions & 4 deletions NDTensors/src/zeros/unallocated_zeros.jl
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,11 @@ function generic_zeros(::Type{UnallocatedZeros}, dim::Integer)
elt = default_eltype()
datat = default_datatype(elt)
N = ndims(datat)
return UnallocatedZeros{elt, N, datat}(Tuple(dim))
return UnallocatedZeros{elt,N,datat}(Tuple(dim))
end

function generic_zeros(::Type{UnallocatedZeros{ElT, N, DataT}}, dim::Integer) where {ElT, N, DataT}
UnallocatedZeros{ElT, N, DataT}(dim)
end
function generic_zeros(
::Type{UnallocatedZeros{ElT,N,DataT}}, dim::Integer
) where {ElT,N,DataT}
return UnallocatedZeros{ElT,N,DataT}(dim)
end

0 comments on commit 0de7b94

Please sign in to comment.