Giter Site home page Giter Site logo

Comments (2)

achirkin avatar achirkin commented on May 28, 2024

Hi, thanks for your interest!

First of all, Vec3f is just a synonym for DataFrame Float '[3]. So you have here a nested DataFrame, normally, a preferred solution would be to have something like DataFrame Float '[XN k, N 3] (reads as "an array of 3D vectors, that has length of at least k"), or more general DataFrame Float (xns +: N 3). Though, you can always flatten nested DataFrames using joinDataFrame. But of course, you can surely use a nested DataFrame too.

Regarding your question, I don't remember if easytensor has this exact function, but you can make one using folds. For example, you can use sewfoldr, which reads as "simple element-wise right fold". That is, just like with a normal Foldable, you can write dataFrameToList = sewfoldr (:) [] to construct a lazy list (or sewfoldr (\x xs -> unScalar x : xs) [] for a nested DataFrame).
The Numeric.DataFrame.SubSpace module has a set of very flexible folds, maps, and traversals, which work with arbitrary dimensionalities (known or unknown at compile time). However, you may need to use lots of type annotations to fix the types (which makes it rather difficult use in the beginning).

from easytensor.

ubuntunux avatar ubuntunux commented on May 28, 2024

Thank you very much.

from easytensor.

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.