Open bozhikovstanislav opened 5 years ago
Can you give me some more context here? What exactly is different and why is float64 consistent but float32 isn't?
here is explained
On Thu, Aug 22, 2019 at 4:50 AM James Kerns notifications@github.com wrote:
Can you give me some more context here? What exactly is different and why is float64 consistent but float32 isn't?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jrkerns/pylinac/issues/189?email_source=notifications&email_token=ABTLNLWV3FKZM7BHA554GGDQFXWETA5CNFSM4II33P72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD43TXKA#issuecomment-523713448, or mute the thread https://github.com/notifications/unsubscribe-auth/ABTLNLRMR5NI52IE4WM7OXTQFXWETANCNFSM4II33P7Q .
I found that when my professor is doing the same calculation on his computer . the results were differed than that of my computer . after changing np.float32 to np.float64 . everything go the same ... as it was mention in the link above . it is related on how numpy library is manipulating big set of array .... this is what I can say ..
Describe the bug A clear and concise description of what the bug is.
The calculation are different on different computers .
There is problem in core directory file image.py
change it with float32 to float64 fixed it
the numpy array must be of type np.float64 !! . .
40 img = load(path, dtype=np.float64)
. . . 624 img_x = spf.sobel(ref_img.as_type(np.float64), 1) 625 img_y = spf.sobel(ref_img.as_type(np.float64), 0)
this fixed it
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.