PyTorch often receives requests for NumPy -like functionality. This issue is a "rollup" of these requests. It will be continue to be updated with additional requests and helpful links for implementing them.
Newer contributors, checkout the Wiki and read the Contribution Guide for help getting started.
If one of these issues requires additional discussion then, to avoid cluttering this rollup, please create a new issue titled “Implementing [Request]”, label it with “module: numpy”, and start the more focused discussion there.
Functions (Updated for the PyTorch 1.8 release):
Completed Functions
diff , implemented by @soulitzer in Implement np.diff for single order differences #50569
any and all supporting all dtypes, implemented by @kshitij12345 in [numpy] torch.{all, any} : Extend Dtype Support #44790
broadcast_to , implemented by @RockingJavaBean in Implementing NumPy-like function torch.broadcast_to #48997
xlogy , see original issue Implement torch.xlogy #22656 , implemented by @kshitij12345 in [numpy] Add torch.xlogy #48777
floatpower , implemented by @Kiyosora in Implement NumPy-like function torch.float_power() #44937
msort , added by @Kiyosora in Implement NumPy-like function torch.msort() #48440
ldexp , added by @ranman in Add basic ldexp operator for numpy compatibility #45370
column_stack and row_stack , implemented by @RockingJavaBean in implement NumPy-like functionality column_stack, row_stack #46313
kron , implemented by @IvanYashchuk in Added Kronecker product of tensors (torch.kron) #45358
ravel , implemented by @ejguan in Implement ravel #46098
swapaxes , implemented by @kshitij12345 in Add torch.swapdims and torch.swapaxes #46041
tile , implemented by @arbfay in An implementation of torch.tile as requested in pytorch/pytorch#38349 #47974
copysign , implemented by @ejguan in Implement copysign #46396
maximum , minimum implemented by @RockingJavaBean in implement NumPy-like functionality maximum, minimum #42579
dstack , hstack , vstack , implemented by @muthuArivoli in Implement hstack, vstack, dstack #42799
arcosh , arcsinh , arctanh , implemented by @krshrimali in Add arcosh, arcsinh and arctanh to unary ops #38388
atleast_1d , atleast_2d , atleast_3d , implemented by @kshitij12345 in Add torch.atleast_{1d/2d/3d} #41317
deg2rad , rad2deg , implemented by @aayn in Implement rad2deg, deg2rad #38852
fliplr , flipud , implemented by @kshitij12345 in Add torch.flip{lr, ud} #38599
isneginf , isposinf , implemented by @RockingJavaBean in implement numpy-like functionality isposinf, isneginf #41588
isreal , implemented by @Justin-Huber in torch.isreal #41298
logaddexp , logaddexp2 , implemented by @cloudhan in Implement logaddexp #38384
signbit , implemented by @Kiyosora in Implementing NumPy-like function torch.signbit() #41589
count_nonzero , implemented by @kshitij12345 in Add torch.count_nonzero #39992
gcd , lcm , implemented by @aayn in Implement gcd, lcm #40651
moveaxis (Add moveaxis function #36048 ), implemented by @kshitij12345 in Add torch.movedim #41480 (as movedim)
quantile , implemented by @heitorschueroff in Initial implementation of quantile operator #39417
nansum , implemented by @kshitij12345 in Add torch.nansum #38628
hypot ([feature request] torch.hypot #22764 ), implemented by @muthuArivoli in Implement hypot #42291
nextafter , implemented by @muthuArivoli in Implement torch.nextafter #42580
cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @anjali411 @mruberry @rgommers @heitorschueroff
cc @aayn @n-gao
PyTorch often receives requests for NumPy-like functionality. This issue is a "rollup" of these requests. It will be continue to be updated with additional requests and helpful links for implementing them.
Newer contributors, checkout the Wiki and read the Contribution Guide for help getting started.
If one of these issues requires additional discussion then, to avoid cluttering this rollup, please create a new issue titled “Implementing [Request]”, label it with “module: numpy”, and start the more focused discussion there.
Functions (Updated for the PyTorch 1.8 release):
clamp()with tensor min and max #2793)Completed Functions
np.difffor single order differences #50569torch.xlogy#48777torch.swapdimsandtorch.swapaxes#46041torch.atleast_{1d/2d/3d}#41317torch.flip{lr, ud}#38599torch.count_nonzero#39992torch.movedim#41480 (as movedim)torch.nansum#38628cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @anjali411 @mruberry @rgommers @heitorschueroff
cc @aayn @n-gao