fury-gl / fury

FURY - Free Unified Rendering in pYthon.
https://fury.gl
Other
244 stars 182 forks source link

Fix DeprecationWarning #37

Closed skoudoro closed 5 years ago

skoudoro commented 5 years ago

We have to fix this 2 warnings:

/Users/skab/Software/fury/fury/window.py:942: DeprecationWarning: elementwise == comparison failed; this will raise an error in the future.
  flags[i] = np.any(np.all(im == col, axis=-1))

/Users/skab/Software/fury/fury/window.py:274: DeprecationWarning: Class 'fury.window.add' is deprecated, instead use class 'fury.window.Scene.add'.
  " use class 'fury.window.Scene.add'.", DeprecationWarning)
jhlegarreta commented 5 years ago

@skoudoro The second warning is not present in the current build. Also, I have not found references to fury.window.add besides those destinated to testing the warning.

As for the second one, they are triggered in test_actors.py#L770 since the colors have 4 components (RGBA), but the image array has just RGB. I ignore whether the inverse can happen, i.e. having an image with RGBA and the color array just being RGB.

I'll follow with a PR and will be able to discuss the fix there.

skoudoro commented 5 years ago

ok, thank you for catching that! This means that is a easy fix. I look forward for your PR