Comments (2)
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.
Thank you very much.
from easytensor.
Related Issues (20)
- prop_Comparisons fails every once in a while HOT 1
- Add mechanism for easily getting field offsets HOT 2
- Slicing a DataFrame HOT 2
- Stability of LU factorization HOT 1
- easytensor-vulkan doesn't build HOT 1
- cabal files missing HOT 4
- slice and ewfoldr usage HOT 13
- packDF usage? HOT 3
- PrimBytes instances for Foreign.C.Types HOT 3
- Need simpler way to get a PrimBytes field from a Ptr
- Need PrimBytes instance for `FunPtr a`
- Projection matrices need variants for Vulkan and have wrong docs HOT 9
- Missing pattern synonyms in haddock output
- internal error: ARR_WORDS object entered HOT 1
- instances for ad package missing HOT 1
- Type-checking yet incorrect typo in Dim.hs HOT 1
- ghc-8.6 HOT 3
- HomTransform4 not implemented HOT 4
- Need a better error message for absence PrimBytes (DataFrame t ds) instance HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easytensor.