-
Notifications
You must be signed in to change notification settings - Fork 50
The rabbit hole that is the data macro #60
Comments
Damn. In the discussion I started on julia-stats a while ago [1], @StefanKarpinski said that he thought 1: https://groups.google.com/d/topic/julia-stats/1CYmgu1Lye0/discussion |
I hope staged functions are sufficient. I am going to ignore this for now since I don't see a way forward without new tools in Base. |
The right way to do this is to implement |
Oh great. I had naively assumed the So much of our codebase is basically copy/pasted from other places that I've got no opposition to doing it again. What's the bug in |
The bug is that setting a portion of a DataArray to be another DataArray fails if the latter has NAs. #62 has an easy fix that would unfortunately create a bunch of ambiguity warnings if applied to master, but it isn't the complete fix; we should also handle setting a portion of a DataArray to be an arbitrary AbstractDataArray. |
(And after that change, my tests are still failing, now because of JuliaLang/julia#5448.) |
Right now, the
@data
macro handles most things correctly except for variables that are equal toNA
.Consider this example:
This will fail because the type of
c
isn't known from the surface analysis that the@data
macro does. To fix this, we'd need to write out code that analyzes the values of the inputs, which can't be known at compile-time. So the macro needs to write code that does analysis at run-time.The text was updated successfully, but these errors were encountered: