Giter Club home page Giter Club logo

Comments (8)

SimonDanisch avatar SimonDanisch commented on August 17, 2024 2

Alright, that's fair! I think GeometryBasics should just support a convenience constructor for this :)

from geometrybasics.jl.

piever avatar piever commented on August 17, 2024 1

I've commented over at JuliaArrays/StructArrays.jl#126 (comment). It can be made to work already if one calls the constructor in a slightly different way, and one gets a

StructArray(data::StructArray(::Array{Float32,1}, ::Array{Float32,1}, ::Array{Float32,1}))

from geometrybasics.jl.

SimonDanisch avatar SimonDanisch commented on August 17, 2024

it would be useful to have mutable StructArrays of point

Why? Can you give a concrete example?

from geometrybasics.jl.

asinghvi17 avatar asinghvi17 commented on August 17, 2024

Transformations with the Proj library come to mind - it accepts separate arrays of x, y, and z, and the most efficient mode of operation is to operate in place. Having 3 arrays of x, y, and z which could be transformed in place would be pretty useful, especially when you get into >500K points.

from geometrybasics.jl.

SimonDanisch avatar SimonDanisch commented on August 17, 2024

I thought this was trivially supported, but can't find the correct constructor right now :D Evidence, that this should be made easier & documented...

from geometrybasics.jl.

SimonDanisch avatar SimonDanisch commented on August 17, 2024

After talking with @piever it may be a bug:
JuliaArrays/StructArrays.jl#126

from geometrybasics.jl.

asinghvi17 avatar asinghvi17 commented on August 17, 2024

Well I tried it a while ago...the issue is that we store the data in a tuple, so StructArrays just makes an array of tuples, which is useless for this. We need to define our own static schema which takes, for example, a Point3f0, and maps it to x, y, and z (or x1, x2 and x3, but that's uglier)...

from geometrybasics.jl.

SimonDanisch avatar SimonDanisch commented on August 17, 2024

Yeah, but this is supposed to "just work"... So lets see if we can have this fixed ;)

from geometrybasics.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.