Giter Club home page Giter Club logo

Comments (4)

mtfishman avatar mtfishman commented on June 9, 2024 1

Ah I see. It might not be a bad idea for a name, since Tensor may clash with other packages. Some of the type names are already getting quite long as they are, though.

from ndtensors.jl.

emstoudenmire avatar emstoudenmire commented on June 9, 2024

Agreed, yes. Then I guess one immediate advantage is that something like a Vector{Index} or a Vector{MyType} where MyType is some type from an external library could work as the indices of a Tensor? (Btw I kept wanting to call it an “NDTensor” when writing the paper.)

from ndtensors.jl.

mtfishman avatar mtfishman commented on June 9, 2024

Yeah, though it wouldn't be a good idea to use Vector as the storage, since that is not statically sized so the order of the Tensor wouldn't be inferable. SVector or MVector would be better examples of other storage to use. I was considering that we could limit the storage to be NTuple{N,IndT}, since Tuple is a pretty generic format that statically sized containers are easily converted to (for example SVector, MVector and IndexSet all have costless conversions to Tuple). This could be handled easily since the tensor(::ITensor) conversion would convert the IndexSet to an NTuple{N, Index}, and the itensor(::Tensor) would convert it back to an IndexSet (that case is already handled now). It could make some of the code in NDTensors simpler, since now it needs to generically account for any storage type that inds could have which makes for some ugly code in certain places. I don't expect people would be coming up with crazy storage types to use for inds that couldn't just be converted to a Tuple.

I guess "NDTensor" could be used interchangeably with "NDTensors", like we will use "ITensor" interchangeably with "ITensors". In retrospect we could have called the package "NDTensor", since it doesn't clash with any actual type names in the package, but it just seemed natural to have the symmetry with "ITensors".

from ndtensors.jl.

emstoudenmire avatar emstoudenmire commented on June 9, 2024

That’s interesting about sticking just to NTuple. It makes a lot of sense if the code is having to do contortions to be overly generic.

Actually, I didn’t mean about renaming the package to NDTensor.jl - NDTensors is a good name -just I kept thinking the actual type is called NDTensor (so like T = NDTensor(3,4)).

from ndtensors.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.