@@ -754,14 +754,26 @@ def test_arccos(self):
754
754
x = KerasTensor ([None , 3 ])
755
755
self .assertEqual (knp .arccos (x ).shape , (None , 3 ))
756
756
757
+ def test_arccosh (self ):
758
+ x = KerasTensor ([None , 3 ])
759
+ self .assertEqual (knp .arccosh (x ).shape , (None , 3 ))
760
+
757
761
def test_arcsin (self ):
758
762
x = KerasTensor ([None , 3 ])
759
763
self .assertEqual (knp .arcsin (x ).shape , (None , 3 ))
760
764
765
+ def test_arcsinh (self ):
766
+ x = KerasTensor ([None , 3 ])
767
+ self .assertEqual (knp .arcsinh (x ).shape , (None , 3 ))
768
+
761
769
def test_arctan (self ):
762
770
x = KerasTensor ([None , 3 ])
763
771
self .assertEqual (knp .arctan (x ).shape , (None , 3 ))
764
772
773
+ def test_arctanh (self ):
774
+ x = KerasTensor ([None , 3 ])
775
+ self .assertEqual (knp .arctanh (x ).shape , (None , 3 ))
776
+
765
777
def test_argmax (self ):
766
778
x = KerasTensor ([None , 3 ])
767
779
self .assertEqual (knp .argmax (x ).shape , ())
@@ -855,6 +867,10 @@ def test_cos(self):
855
867
x = KerasTensor ([None , 3 ])
856
868
self .assertEqual (knp .cos (x ).shape , (None , 3 ))
857
869
870
+ def test_cosh (self ):
871
+ x = KerasTensor ([None , 3 ])
872
+ self .assertEqual (knp .cosh (x ).shape , (None , 3 ))
873
+
858
874
def test_count_nonzero (self ):
859
875
x = KerasTensor ([None , 3 ])
860
876
self .assertEqual (knp .count_nonzero (x ).shape , ())
@@ -1095,6 +1111,10 @@ def test_sin(self):
1095
1111
x = KerasTensor ([None , 3 ])
1096
1112
self .assertEqual (knp .sin (x ).shape , (None , 3 ))
1097
1113
1114
+ def test_sinh (self ):
1115
+ x = KerasTensor ([None , 3 ])
1116
+ self .assertEqual (knp .sinh (x ).shape , (None , 3 ))
1117
+
1098
1118
def test_size (self ):
1099
1119
x = KerasTensor ([None , 3 ])
1100
1120
self .assertEqual (knp .size (x ).shape , ())
@@ -1137,6 +1157,10 @@ def test_tan(self):
1137
1157
x = KerasTensor ([None , 3 ])
1138
1158
self .assertEqual (knp .tan (x ).shape , (None , 3 ))
1139
1159
1160
+ def test_tanh (self ):
1161
+ x = KerasTensor ([None , 3 ])
1162
+ self .assertEqual (knp .tanh (x ).shape , (None , 3 ))
1163
+
1140
1164
def test_tile (self ):
1141
1165
x = KerasTensor ([None , 3 ])
1142
1166
self .assertEqual (knp .tile (x , [2 ]).shape , (None , 6 ))
@@ -1227,14 +1251,26 @@ def test_arccos(self):
1227
1251
x = KerasTensor ([2 , 3 ])
1228
1252
self .assertEqual (knp .arccos (x ).shape , (2 , 3 ))
1229
1253
1254
+ def test_arccosh (self ):
1255
+ x = KerasTensor ([2 , 3 ])
1256
+ self .assertEqual (knp .arccosh (x ).shape , (2 , 3 ))
1257
+
1230
1258
def test_arcsin (self ):
1231
1259
x = KerasTensor ([2 , 3 ])
1232
1260
self .assertEqual (knp .arcsin (x ).shape , (2 , 3 ))
1233
1261
1262
+ def test_arcsinh (self ):
1263
+ x = KerasTensor ([2 , 3 ])
1264
+ self .assertEqual (knp .arcsinh (x ).shape , (2 , 3 ))
1265
+
1234
1266
def test_arctan (self ):
1235
1267
x = KerasTensor ([2 , 3 ])
1236
1268
self .assertEqual (knp .arctan (x ).shape , (2 , 3 ))
1237
1269
1270
+ def test_arctanh (self ):
1271
+ x = KerasTensor ([2 , 3 ])
1272
+ self .assertEqual (knp .arctanh (x ).shape , (2 , 3 ))
1273
+
1238
1274
def test_argmax (self ):
1239
1275
x = KerasTensor ([2 , 3 ])
1240
1276
self .assertEqual (knp .argmax (x ).shape , ())
@@ -1297,6 +1333,10 @@ def test_cos(self):
1297
1333
x = KerasTensor ([2 , 3 ])
1298
1334
self .assertEqual (knp .cos (x ).shape , (2 , 3 ))
1299
1335
1336
+ def test_cosh (self ):
1337
+ x = KerasTensor ([2 , 3 ])
1338
+ self .assertEqual (knp .cosh (x ).shape , (2 , 3 ))
1339
+
1300
1340
def test_count_nonzero (self ):
1301
1341
x = KerasTensor ([2 , 3 ])
1302
1342
self .assertEqual (knp .count_nonzero (x ).shape , ())
@@ -1532,6 +1572,10 @@ def test_sin(self):
1532
1572
x = KerasTensor ([2 , 3 ])
1533
1573
self .assertEqual (knp .sin (x ).shape , (2 , 3 ))
1534
1574
1575
+ def test_sinh (self ):
1576
+ x = KerasTensor ([2 , 3 ])
1577
+ self .assertEqual (knp .sinh (x ).shape , (2 , 3 ))
1578
+
1535
1579
def test_size (self ):
1536
1580
x = KerasTensor ([2 , 3 ])
1537
1581
self .assertEqual (knp .size (x ).shape , ())
@@ -1579,6 +1623,10 @@ def test_tan(self):
1579
1623
x = KerasTensor ([2 , 3 ])
1580
1624
self .assertEqual (knp .tan (x ).shape , (2 , 3 ))
1581
1625
1626
+ def test_tanh (self ):
1627
+ x = KerasTensor ([2 , 3 ])
1628
+ self .assertEqual (knp .tanh (x ).shape , (2 , 3 ))
1629
+
1582
1630
def test_tile (self ):
1583
1631
x = KerasTensor ([2 , 3 ])
1584
1632
self .assertEqual (knp .tile (x , [2 ]).shape , (2 , 6 ))
@@ -2266,18 +2314,42 @@ def test_transpose(self):
2266
2314
np .transpose (x , axes = (1 , 0 , 3 , 2 , 4 )),
2267
2315
)
2268
2316
2269
- def test_arcos (self ):
2317
+ def test_arccos (self ):
2270
2318
x = np .array ([[1 , 0.5 , - 0.7 ], [0.9 , 0.2 , - 1 ]])
2271
2319
self .assertAllClose (knp .arccos (x ), np .arccos (x ))
2272
2320
2273
2321
self .assertAllClose (knp .Arccos ()(x ), np .arccos (x ))
2274
2322
2323
+ def test_arccosh (self ):
2324
+ x = np .array ([[1 , 0.5 , - 0.7 ], [0.9 , 0.2 , - 1 ]])
2325
+ self .assertAllClose (knp .arccosh (x ), np .arccosh (x ))
2326
+
2327
+ self .assertAllClose (knp .Arccosh ()(x ), np .arccosh (x ))
2328
+
2275
2329
def test_arcsin (self ):
2276
2330
x = np .array ([[1 , 0.5 , - 0.7 ], [0.9 , 0.2 , - 1 ]])
2277
2331
self .assertAllClose (knp .arcsin (x ), np .arcsin (x ))
2278
2332
2279
2333
self .assertAllClose (knp .Arcsin ()(x ), np .arcsin (x ))
2280
2334
2335
+ def test_arcsinh (self ):
2336
+ x = np .array ([[1 , 0.5 , - 0.7 ], [0.9 , 0.2 , - 1 ]])
2337
+ self .assertAllClose (knp .arcsinh (x ), np .arcsinh (x ))
2338
+
2339
+ self .assertAllClose (knp .Arcsinh ()(x ), np .arcsinh (x ))
2340
+
2341
+ def test_arctan (self ):
2342
+ x = np .array ([[1 , 0.5 , - 0.7 ], [0.9 , 0.2 , - 1 ]])
2343
+ self .assertAllClose (knp .arctan (x ), np .arctan (x ))
2344
+
2345
+ self .assertAllClose (knp .Arctan ()(x ), np .arctan (x ))
2346
+
2347
+ def test_arctanh (self ):
2348
+ x = np .array ([[1 , 0.5 , - 0.7 ], [0.9 , 0.2 , - 1 ]])
2349
+ self .assertAllClose (knp .arctanh (x ), np .arctanh (x ))
2350
+
2351
+ self .assertAllClose (knp .Arctanh ()(x ), np .arctanh (x ))
2352
+
2281
2353
def test_argmax (self ):
2282
2354
x = np .array ([[1 , 2 , 3 ], [3 , 2 , 1 ]])
2283
2355
self .assertAllClose (knp .argmax (x ), np .argmax (x ))
@@ -2433,6 +2505,11 @@ def test_cos(self):
2433
2505
self .assertAllClose (knp .cos (x ), np .cos (x ))
2434
2506
self .assertAllClose (knp .Cos ()(x ), np .cos (x ))
2435
2507
2508
+ def test_cosh (self ):
2509
+ x = np .array ([[1 , 2 , 3 ], [3 , 2 , 1 ]])
2510
+ self .assertAllClose (knp .cosh (x ), np .cosh (x ))
2511
+ self .assertAllClose (knp .Cosh ()(x ), np .cosh (x ))
2512
+
2436
2513
def test_count_nonzero (self ):
2437
2514
x = np .array ([[0 , 2 , 3 ], [3 , 2 , 0 ]])
2438
2515
self .assertAllClose (knp .count_nonzero (x ), np .count_nonzero (x ))
@@ -2899,6 +2976,11 @@ def test_sin(self):
2899
2976
self .assertAllClose (knp .sin (x ), np .sin (x ))
2900
2977
self .assertAllClose (knp .Sin ()(x ), np .sin (x ))
2901
2978
2979
+ def test_sinh (self ):
2980
+ x = np .array ([[1 , - 2 , 3 ], [- 3 , 2 , - 1 ]])
2981
+ self .assertAllClose (knp .sinh (x ), np .sinh (x ))
2982
+ self .assertAllClose (knp .Sinh ()(x ), np .sinh (x ))
2983
+
2902
2984
def test_size (self ):
2903
2985
x = np .array ([[1 , 2 , 3 ], [3 , 2 , 1 ]])
2904
2986
self .assertAllClose (knp .size (x ), np .size (x ))
@@ -2993,6 +3075,11 @@ def test_tan(self):
2993
3075
self .assertAllClose (knp .tan (x ), np .tan (x ))
2994
3076
self .assertAllClose (knp .Tan ()(x ), np .tan (x ))
2995
3077
3078
+ def test_tanh (self ):
3079
+ x = np .array ([[1 , - 2 , 3 ], [- 3 , 2 , - 1 ]])
3080
+ self .assertAllClose (knp .tanh (x ), np .tanh (x ))
3081
+ self .assertAllClose (knp .Tanh ()(x ), np .tanh (x ))
3082
+
2996
3083
def test_tile (self ):
2997
3084
x = np .array ([[1 , 2 , 3 ], [3 , 2 , 1 ]])
2998
3085
self .assertAllClose (knp .tile (x , [2 , 3 ]), np .tile (x , [2 , 3 ]))
0 commit comments