phoebe-project / phoebe2

PHOEBE - Eclipsing Binary Star Modeling Software
http://phoebe-project.org
GNU General Public License v3.0
76 stars 28 forks source link

Numpy array comparison fix #785

Closed aprsa closed 9 months ago

aprsa commented 9 months ago

Old versions of numpy could compare different length arrays element-wise (i.e., np.all(x==y) for x.shape != y.shape). That is no longer the case for numpy 1.24 onwards. Note that the fix uses len(x) instead of x.shape comparison to be more general, i.e. it works also if x and y are other types of iterables, not just ndarrays.