Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
kmp5VT committed Mar 6, 2024
1 parent 8052f55 commit f35a19a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
10 changes: 8 additions & 2 deletions NDTensors/src/tensor/set_types.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
using .TypeParameterAccessors: TypeParameterAccessors, Position, parenttype, set_parenttype, set_type_parameter, set_type_parameters
using .TypeParameterAccessors:
TypeParameterAccessors,
Position,
parenttype,
set_parenttype,
set_type_parameter,
set_type_parameters
function SetParameters.set_ndims(arraytype::Type{<:Tensor}, ndims)
# TODO: Implement something like:
# ```julia
Expand All @@ -25,4 +31,4 @@ end
TypeParameterAccessors.position(::Type{<:Tensor}, ::typeof(eltype)) = Position(1)
TypeParameterAccessors.position(::Type{<:Tensor}, ::typeof(Base.ndims)) = Position(2)
TypeParameterAccessors.position(::Type{<:Tensor}, ::typeof(parenttype)) = Position(3)
TypeParameterAccessors.position(::Type{<:Tensor}, ::typeof(indstype)) = Position(4)
TypeParameterAccessors.position(::Type{<:Tensor}, ::typeof(indstype)) = Position(4)
3 changes: 2 additions & 1 deletion NDTensors/src/tensorstorage/similar.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using .TypeParameterAccessors: TypeParameterAccessors, parenttype, set_parenttype, set_type_parameter
using .TypeParameterAccessors:
TypeParameterAccessors, parenttype, set_parenttype, set_type_parameter
# NDTensors.similar
similar(storage::TensorStorage) = setdata(storage, NDTensors.similar(data(storage)))

Expand Down

0 comments on commit f35a19a

Please sign in to comment.