gfxdisp / ColorVideoVDP

Colour video VDP
MIT License
29 stars 6 forks source link

Migration to Numpy 2.0.0 #8

Closed kaanaksit closed 4 months ago

kaanaksit commented 4 months ago

Thank you for enabling ColorVideoVDP!

numpy=2.0.0 has some structural changes and implements some of the numpy.lib scripts differently. For instance, in examples/ex_display_brightness.py in gfxdisp/ColorVideoVDP, there is a line:

https://github.com/gfxdisp/ColorVideoVDP/blob/644abf6dfc168533766467b9283dc9c620160657/pycvvdp/cvvdp_metric.py#L3

For numpy=2.0.0. support in the future you may consider replacing this line with:

from numpy.lib._shape_base_impl import expand_dims

I thought this may be useful for your future users given numpy==2.0.0 is likely to be used by them.

mantiuk commented 4 months ago

Thanks for reporting. This should be now fixed. (commit #49b1bb1cb398769e077af860a8c091bdf86f0611).