Alexander Plavin

Results 348 comments of Alexander Plavin

A reason why I have this in my personal utility package, and why propose to add here: ```julia julia> using Distributions, Accessors julia> obj = (x=1, y=2, prob=1e-3) julia> dist...

> Can you explain how the code you've shown is related to InverseFunctions? `Accessors` uses `inverse` when it exists, in order to modify values. For example, ```julia julia> x =...

Both methods I listed (from Base and StatsBase) are fundamentally right in their restriction to Reals: it's not clear what `searchsorted` should do on complex range at all, and stuff...

Maybe the same behavior and reliability is possible without `Real` restrictions, I don't know... If that's the case, Base should really lead "duck-typing", so that `searchsorted` on a range of...

This may be true from the mathematical purity PoV, but pragmatically in Julia: - Some methods only make sense for "real-ish" numbers, not complex numbers, and have signatures defined as...

> In my opinion, these examples are different from quantities and it makes more sense that they are

> What other properties do you have in mind here? I’m genuinely curious. Unitful quantities can be subtracted and compared in a consistent way, unlike some of other ` Do...

I can imagine usecases when non-numeric quantities can be needed. And there's nothing wrong to have a type for that! Although, I don't see how `Quantity{