Wessel

Results 126 comments of Wessel

Hey @daisukeadachi, If `jacobian` receives a matrix-valued function, it will vectorise the output before computing the jacobian, which will then be a matrix. I think this example should be what...

Hey @paulc-git! I believe this should readily generalise to higher dimensions in the way you describe. You’re right that it’s not obvious whether the indexing just works out, but I...

Your proposed interface looks good and like what I had in mind. We can allow multiple integers to specify mixed derivatives; e.g., `grad(fdm, f, x, 1, 2)` would estimate `d^2...

In v0.12, another way of doing this is by setting the `max_range` keyword appropriately: ```julia julia> central_fdm(5, 1, max_range=9e-1)(ceil, 0.2) 6.085449991639748e-14 ```

Interesting, @mzgubic. This trick to modify the step size does have as a consequence that it makes the step size deviate from the computed "best" step size. Perhaps that's what's...

Certainly! The list of suggestions can be printed [here](https://github.com/wesselb/plum/blob/master/plum/function.py#L472). I'm tempted to compute which signatures are closest with an [edit distance](https://en.wikipedia.org/wiki/Wagner%E2%80%93Fischer_algorithm). The one challenge which I'm seeing is how to...

Another way of addressing the type-hints-become-strings issue is to use `dispatch.multi`, which doesn't use the type hints: ``` --- a/plum/parametric.py +++ b/plum/parametric.py @@ -280,12 +280,12 @@ def type_of(obj): return ptype(type(obj))...

Hey @ice-tong! Thank you for the kind words. :) You're totally right that `_types_of_iterable` can run into performance issues when run on nested structures or iterables with many elements. This...

Let's leave this issue open, because it is certainly a performance issue that at some point will need addressing!

Hey @ice-tong, Those are some clever optimisations—halving the runtime of `type_of` is a big improvement! Caching objects and hash values seems like a good way to reduce unnecessary overhead. [Some...