From eb0e2b28c7e1ae45de2cb0f8e20b5eff057665f0 Mon Sep 17 00:00:00 2001 From: Ganesh Tarone <62292892+GTron-1729@users.noreply.github.com> Date: Tue, 24 Mar 2020 21:13:03 +0530 Subject: [PATCH] Made small changes for full functionality the '-' sign at lines 319 and 329 generates an error "TypeError: The numpy boolean negative, the `-` operator, is not supported, use the `~` operator or the logical_not function instead" so i replaced it with '~' Also i have listed different issues that come while running the code, along with their solutions :) #NiceWork #Fully_FunctionalNow --- tracer.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tracer.py b/tracer.py index 59a3bb2..d8f8366 100755 --- a/tracer.py +++ b/tracer.py @@ -1,4 +1,7 @@ #!/usr/bin/python +#Run pip install scipy==1.1.0 because for higher versions of scipy it genrates AttributeError: module 'scipy.misc' has no attribute 'imread' +## Try running on Ubuntu or other linux based OS because windows generates and error of ModuleNotFoundError: No module named '_curses' +##So dont waste time if you encounter these errors just follow above steps :) import numpy as np import matplotlib.pyplot as plt @@ -313,7 +316,7 @@ def rgbtosrgb(arr): arr[mask] **= 1/2.4 arr[mask] *= 1.055 arr[mask] -= 0.055 - arr[-mask] *= 12.92 + arr[~mask] *= 12.92 # TypeError: The numpy boolean negative, the `-` operator, is not supported, use the `~` operator or the logical_not function instead # convert from srgb to linear rgb @@ -323,7 +326,7 @@ def srgbtorgb(arr): arr[mask] += 0.055 arr[mask] /= 1.055 arr[mask] **= 2.4 - arr[-mask] /= 12.92 + arr[~mask] /= 12.92 # TypeError: The numpy boolean negative, the `-` operator, is not supported, use the `~` operator or the logical_not function instead logger.debug("Loading textures...")