noteshrink
noteshrink copied to clipboard
TypeError: unique() got an unexpected keyword argument 'return_counts'
Tried running noteshrink on a JPEG saved from MacOS Preview, with the following result:
Larss-MacBook-Pro:shrink larsga$ noteshrink IMG_544*
opened IMG_5442.JPG
getting palette...
Traceback (most recent call last):
File "/usr/local/bin/noteshrink", line 9, in <module>
load_entry_point('noteshrink==0.1.1', 'console_scripts', 'noteshrink')()
File "/Library/Python/2.7/site-packages/noteshrink.py", line 584, in main
notescan_main(options=get_argument_parser().parse_args())
File "/Library/Python/2.7/site-packages/noteshrink.py", line 560, in notescan_main
palette = get_palette(samples, options)
File "/Library/Python/2.7/site-packages/noteshrink.py", line 383, in get_palette
bg_color = get_bg_color(samples, 6)
File "/Library/Python/2.7/site-packages/noteshrink.py", line 108, in get_bg_color
unique, counts = np.unique(packed, return_counts=True)
TypeError: unique() got an unexpected keyword argument 'return_counts'
return_counts
has been added to unique()
in numpy version 1.9.0. The problem may be caused by outdated numpy in your system. I recommend checking the version and trying to update it.
I got this error. Updated numpy and that solved it.
The command I used pip install numpy --upgrade