Closed rparini closed 7 years ago
I will merge this. Thanks!
Merging #28 into master will not change coverage. The diff coverage is
100%
.
@@ Coverage Diff @@
## master #28 +/- ##
=======================================
Coverage 91.79% 91.79%
=======================================
Files 21 21
Lines 2646 2646
Branches 251 251
=======================================
Hits 2429 2429
Misses 178 178
Partials 39 39
Impacted Files | Coverage Δ | |
---|---|---|
numdifftools/fornberg.py | 72.13% <100%> (ø) |
:white_check_mark: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 3582063...21cf3c9. Read the comment docs.
At the moment the array which stores the derivatives, du, is always real so if the array of function evaluations, fx, is complex then the imaginary part gets discarded when the elements of du are assigned.
/usr/local/lib/python3.5/site-packages/numdifftools/fornberg.py:173: ComplexWarning: Casting complex values to real discards the imaginary part du[i] = np.dot(fd_weights(x[:size], x0=x[i], n=n), fx[:size])
The proposed change fixes this by matching the data type (as well as the shape) of du to fx.
PS thank you for working on this very useful module!