Closed mbauman closed 10 years ago
Nice. In addition to SIUnits, this will make it easier to use DualNumbers
when you want to check those derivatives.
The travis failure is odd: it seems to be trying to pull in Signals.jl, and that's what's failing. But I don't see anything in this that causes that behavior.
Hah, pay no mind to that failure. That's the failure from a referenced commit within Signals.jl... which fails because it requires this patch. The Grid.jl tests passed just fine.
Great to hear this is more generally useful. I think it should be good to go.
Hah, I didn't even notice the context. No wonder I couldn't figure out where it was coming from.
Thanks again!
Thanks!
This patch allows InterpIrregular grids to be unitful (from SIUnits). InterpIrregular grids now accept Numbers for both creation and indexing. Because getindex is defined for Real on AbstractArrays, Grid needs to define both getindex(..., ::Real) and getindex(..., ::Number) to avoid ambiguity.
Here's what this allows:
Of course, if you have a unitful grid, you must index it with compatible units.