-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StackOverflowError when using At
#4
Comments
No that looks like it should work. Im currently on the road but I'll try to fix it in the next few days. |
Ok so the issue is dims should be a tuple! sorry I didn't see that straight away. You are passing single dimensions for the dims field and the second for the refdims field. I'll make the constructor force you to pass in a tuple for both. julia> d = DimensionalArray(rand(12,10), (X(0:11), Y(1:10)))
12×10 DimensionalArray{Float64,2,Tuple{X{LinRange{Float64},Nothing,DimensionalData.Forward},Y{LinRange{Float64},Nothing,DimensionalData.Forward}},Tuple{},Array{Float64,2}}:
0.65014 0.451515 0.858925 0.801924 0.319277 0.261568 0.380133 0.827168 0.906281 0.830167
0.514241 0.681027 0.674725 0.994872 0.302602 0.315485 0.641938 0.364782 0.0624274 0.610432
0.592915 0.629713 0.184351 0.405917 0.122486 0.0131507 0.91589 0.740307 0.109258 0.77165
0.488762 0.573304 0.231533 0.351711 0.647384 0.16866 0.824338 0.776865 0.34958 0.101667
0.1157 0.810775 0.533961 0.40543 0.850627 0.754541 0.0443777 0.138219 0.364477 0.361786
0.531991 0.626329 0.605021 0.104082 0.997339 0.738728 0.84304 0.9079 0.228457 0.853585
0.659272 0.281332 0.358277 0.626901 0.248435 0.94595 0.743765 0.621516 0.763135 0.372894
0.440714 0.300856 0.804684 0.103844 0.650912 0.0509243 0.0909063 0.270426 0.250058 0.332711
0.76212 0.730735 0.871606 0.739727 0.824078 0.173855 0.90869 0.452509 0.962995 0.896341
0.634562 0.305028 0.538881 0.752957 0.530875 0.281745 0.748889 0.916087 0.240868 0.690209
0.0833073 0.211305 0.934384 0.597245 0.629211 0.256024 0.972005 0.790384 0.721913 0.412681
0.646667 0.0659739 0.55635 0.624643 0.721276 0.391332 0.0152408 0.687425 0.416697 0.187871
julia> dims(d)
(
X: X{LinRange{Float64},Nothing,DimensionalData.Forward}
val: range(0.0, stop=11.0, length=12)
metadata: nothing
,
Y: Y{LinRange{Float64},Nothing,DimensionalData.Forward}
val: range(1.0, stop=10.0, length=10)
metadata: nothing
)
julia> d[At(1),At(1)]
0.5142413612261603 |
This is fixed in master and will be registered as an update soon |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using Julia 1.2.0 with DimensionalData v0.1.0 I encounter an issue. Perhaps I'm doing something wrong with the constructor or indexing?
When I try to index with
At
:Also when using the named dimension:
The text was updated successfully, but these errors were encountered: