Comments (2)
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.
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)
- Formatting examples HOT 1
- Looks like you can already automatically build documentation
- Maybe only print attributes if there are any? HOT 1
- Can use multiple dispatch to make `isel!` more flexible.
- Could probably dispatch on `method` for `get_start_stop_indices` HOT 1
- Not super clear why `sel!` and `isel!` modify the `JuxtArray`? HOT 1
- Julia style violation
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 juxta.jl.