|
2 | 2 | # distutils: language = c++ |
3 | 3 | # -*- coding: utf-8 -*- |
4 | 4 | # ***************************************************************************** |
5 | | -# Copyright (c) 2016-2020, Intel Corporation |
| 5 | +# Copyright (c) 2016-2023, Intel Corporation |
6 | 6 | # All rights reserved. |
7 | 7 | # |
8 | 8 | # Redistribution and use in source and binary forms, with or without |
@@ -136,9 +136,8 @@ def arccosh(x1): |
136 | 136 |
|
137 | 137 | Examples |
138 | 138 | -------- |
139 | | - >>> import numpy |
140 | 139 | >>> import dpnp as np |
141 | | - >>> x = np.array([numpy.e, 10.0]) |
| 140 | + >>> x = np.array([np.e, 10.0]) |
142 | 141 | >>> out = np.arccosh(x) |
143 | 142 | >>> [i for i in out] |
144 | 143 | [1.65745445, 2.99322285] |
@@ -205,9 +204,8 @@ def arcsinh(x1): |
205 | 204 |
|
206 | 205 | Examples |
207 | 206 | -------- |
208 | | - >>> import numpy |
209 | 207 | >>> import dpnp as np |
210 | | - >>> x = np.array([numpy.e, 10.0]) |
| 208 | + >>> x = np.array([np.e, 10.0]) |
211 | 209 | >>> out = np.arcsinh(x) |
212 | 210 | >>> [i for i in out] |
213 | 211 | [1.72538256, 2.99822295] |
@@ -384,9 +382,8 @@ def cos(x1, out=None, **kwargs): |
384 | 382 |
|
385 | 383 | Examples |
386 | 384 | -------- |
387 | | - >>> import numpy |
388 | 385 | >>> import dpnp as np |
389 | | - >>> x = np.array([0, numpy.pi/2, numpy.pi]) |
| 386 | + >>> x = np.array([0, np.pi/2, np.pi]) |
390 | 387 | >>> out = np.cos(x) |
391 | 388 | >>> [i for i in out] |
392 | 389 | [1.0, 6.123233995736766e-17, -1.0] |
@@ -464,9 +461,8 @@ def degrees(x1): |
464 | 461 |
|
465 | 462 | Examples |
466 | 463 | -------- |
467 | | - >>> import numpy |
468 | 464 | >>> import dpnp as np |
469 | | - >>> rad = np.arange(6.) * numpy.pi/6 |
| 465 | + >>> rad = np.arange(6.) * np.pi/6 |
470 | 466 | >>> out = np.degrees(rad) |
471 | 467 | >>> [i for i in out] |
472 | 468 | [0.0, 30.0, 60.0, 90.0, 120.0, 150.0] |
@@ -652,9 +648,8 @@ def log(x1, out=None, **kwargs): |
652 | 648 |
|
653 | 649 | Examples |
654 | 650 | -------- |
655 | | - >>> import numpy |
656 | 651 | >>> import dpnp as np |
657 | | - >>> x = np.array([1.0, numpy.e, numpy.e**2, 0.0]) |
| 652 | + >>> x = np.array([1.0, np.e, np.e**2, 0.0]) |
658 | 653 | >>> out = np.log(x) |
659 | 654 | >>> [i for i in out] |
660 | 655 | [0.0, 1.0, 2.0, -inf] |
@@ -867,9 +862,8 @@ def sin(x1, out=None, **kwargs): |
867 | 862 |
|
868 | 863 | Examples |
869 | 864 | -------- |
870 | | - >>> import numpy |
871 | 865 | >>> import dpnp as np |
872 | | - >>> x = np.array([0, numpy.pi/2, numpy.pi]) |
| 866 | + >>> x = np.array([0, np.pi/2, np.pi]) |
873 | 867 | >>> out = np.sin(x) |
874 | 868 | >>> [i for i in out] |
875 | 869 | [0.0, 1.0, 1.2246467991473532e-16] |
@@ -897,9 +891,8 @@ def sinh(x1): |
897 | 891 |
|
898 | 892 | Examples |
899 | 893 | -------- |
900 | | - >>> import numpy |
901 | 894 | >>> import dpnp as np |
902 | | - >>> x = np.array([0, numpy.pi/2, numpy.pi]) |
| 895 | + >>> x = np.array([0, np.pi/2, np.pi]) |
903 | 896 | >>> out = np.sinh(x) |
904 | 897 | >>> [i for i in out] |
905 | 898 | [0.0, 2.3012989, 11.548739] |
@@ -991,9 +984,8 @@ def tan(x1, out=None, **kwargs): |
991 | 984 |
|
992 | 985 | Examples |
993 | 986 | -------- |
994 | | - >>> import numpy |
995 | 987 | >>> import dpnp as np |
996 | | - >>> x = np.array([-numpy.pi, numpy.pi/2, numpy.pi]) |
| 988 | + >>> x = np.array([-np.pi, np.pi/2, np.pi]) |
997 | 989 | >>> out = np.tan(x) |
998 | 990 | >>> [i for i in out] |
999 | 991 | [1.22460635e-16, 1.63317787e+16, -1.22460635e-16] |
@@ -1021,9 +1013,8 @@ def tanh(x1): |
1021 | 1013 |
|
1022 | 1014 | Examples |
1023 | 1015 | -------- |
1024 | | - >>> import numpy |
1025 | 1016 | >>> import dpnp as np |
1026 | | - >>> x = np.array([-numpy.pi, numpy.pi/2, numpy.pi]) |
| 1017 | + >>> x = np.array([-np.pi, np.pi/2, np.pi]) |
1027 | 1018 | >>> out = np.tanh(x) |
1028 | 1019 | >>> [i for i in out] |
1029 | 1020 | [-0.996272, 0.917152, 0.996272] |
@@ -1055,11 +1046,10 @@ def unwrap(x1): |
1055 | 1046 |
|
1056 | 1047 | Examples |
1057 | 1048 | -------- |
1058 | | - >>> import numpy |
1059 | 1049 | >>> import dpnp as np |
1060 | | - >>> phase = np.linspace(0, numpy.pi, num=5) |
| 1050 | + >>> phase = np.linspace(0, np.pi, num=5) |
1061 | 1051 | >>> for i in range(3, 5): |
1062 | | - >>> phase[i] += numpy.pi |
| 1052 | + >>> phase[i] += np.pi |
1063 | 1053 | >>> out = np.unwrap(phase) |
1064 | 1054 | >>> [i for i in out] |
1065 | 1055 | [0.0, 0.78539816, 1.57079633, 5.49778714, 6.28318531] |
|
0 commit comments