You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's no reason we can't rescale differently in row vs. col (or x vs. y)
I think the change is as simple as sanitizing scale to accept a single or multiple values, and updating the following block to use the correct indices:
if shape is None:
shape = np.ceil((img.shape[0]*scale, img.shape[1]*scale)).astype(int)
else:
if np.isscalar(shape):
shape = np.ceil((shape*scale, shape*scale)).astype(int)
else:
shape = np.ceil((shape[0]*scale, shape[1]*scale)).astype(int)
x = (np.arange(shape[1], dtype=np.float64) - shape[1]/2.)/scale + img.shape[1]/2.
y = (np.arange(shape[0], dtype=np.float64) - shape[0]/2.)/scale + img.shape[0]/2.
The text was updated successfully, but these errors were encountered:
There's no reason we can't rescale differently in row vs. col (or x vs. y)
I think the change is as simple as sanitizing
scale
to accept a single or multiple values, and updating the following block to use the correct indices:The text was updated successfully, but these errors were encountered: