Giter Club home page Giter Club logo

Comments (2)

ali-ramadhan avatar ali-ramadhan commented on July 18, 2024

Also not sure it it makes sense but could make it

struct JuxtArray{...} <: AbstractArray

so it behaves like a regular array. Might make sense if it's meant to be accessed like ja[4, 5, 1], etc.

from juxta.jl.

beta-effect avatar beta-effect commented on July 18, 2024

Why make the struct mutable?

It is mutable because the sel!/ isel! methods use getindex to create a new array and assign them to the JuxtArray.array field. This can be solved by using view instead of getindex or by forcing sel!/isel! to create new JuxtArrays. I am more inclined towards the second option in agreement with issue #7.

I'm wondering if it would be better to use Symbols instead of Strings as the key.

Absolutely. The keyword arguments in sel! and isel! would be cleaner as well if we use symbols. Thank you for the link to the explanation of symbols. I was reluctant to use them mainly because I did not understand their purpose. That link was helpful.

I used to use @Assert but apparently in C/C++, Python, and Julia they seem more for checking developer mistakes and may actually be disabled by certain optimization levels. So might be better to throw exceptions or something else.

Oh, I did not know that. Thank you. Will do.

from juxta.jl.

Related Issues (8)

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.