Open b0blee opened 3 years ago
Check out https://github.com/msieg/deep-music-visualizer/issues/16#issuecomment-819069688 for the rewrite of the deprecated function toimage()
.
Also, check out my fork of the DMV, where I implemented it already.
Thank you. That works. Very grateful.
-b0b-
On Sun, Aug 22, 2021 at 3:11 AM Harald Töpfer @.***> wrote:
Check out https://github.com/msieg/deep-music-visualizer/issues/16#issuecomment-819069688 http://url for the rewrite of the deprecated function toimage(). Also, check out my fork of the DMV, where I implemented it already.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/msieg/deep-music-visualizer/issues/19#issuecomment-903244997, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZ4JJNZRMDWDDJYNIJQQ33T6DEOVANCNFSM5CLNQI4Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
Check out #16 (comment) for the rewrite of the deprecated function
toimage()
. Also, check out my fork of the DMV, where I implemented it already.
Thanks for this!
@b0blee @ahoang512 you're welcome!
replace im=np.array(toimage(out))
with the following
out = np.moveaxis(out, 0, -1)
im=np.array(Image.fromarray(np.uint8(out*255)))
I don't know if this is a Mac-only problem, but I can't get scipy 1.1 to install. The install script fails. (Error listed below)
But beyond that, is there any way to replace toimage(), the only function required from scipy? That function was deprecated and then removed from the package long ago. The code in question is:
A rewrite of that, perhaps using the Image class, seems to be in order.
Anyway, here's the absurd error I'm getting from scipy's setup.py: ERROR: Command errored out with exit status 1: command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4n/58lgvxkx24d7q6y0pbkz7df00000gp/T/pip-install-c0krthbx/scipy_32ea160cb9384bc1976f352cc1c918b9/setup.py'"'"'; file='"'"'/private/var/folders/4n/58lgvxkx24d7q6y0pbkz7df00000gp/T/pip-install-c0krthbx/scipy_32ea160cb9384bc1976f352cc1c918b9/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/4n/58lgvxkx24d7q6y0pbkz7df00000gp/T/pip-record-ycegi919/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/scipy cwd: /private/var/folders/4n/58lgvxkx24d7q6y0pbkz7df00000gp/T/pip-install-c0krthbx/scipy_32ea160cb9384bc1976f352cc1c918b9/