carray 3.0.1 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +824 -0
  3. data/README.md +5 -6
  4. data/carray.gemspec +1 -1
  5. data/ext/ca_axis_dispatch.c +258 -4
  6. data/ext/ca_axis_group.c +368 -184
  7. data/ext/ca_binop_dispatch.c +54 -32
  8. data/ext/ca_binop_dispatch.h +1 -0
  9. data/ext/ca_categorical_iterator.c +90 -41
  10. data/ext/ca_compare.c +8 -2
  11. data/ext/ca_for_buffer.h +21 -68
  12. data/ext/ca_group_iter.c +27 -11
  13. data/ext/ca_kernel_iterator.c +960 -245
  14. data/ext/ca_kernel_iterator.h +352 -181
  15. data/ext/ca_monop_dispatch.c +4 -4
  16. data/ext/ca_monop_dispatch.h +4 -0
  17. data/ext/ca_obj_array.c +194 -42
  18. data/ext/ca_obj_bincmp.c +152 -121
  19. data/ext/ca_obj_binop.c +107 -210
  20. data/ext/ca_obj_bitarray.c +37 -24
  21. data/ext/ca_obj_bitfield.c +95 -62
  22. data/ext/ca_obj_block.c +5 -4
  23. data/ext/ca_obj_byte_swap.c +40 -40
  24. data/ext/ca_obj_const_string.c +180 -50
  25. data/ext/ca_obj_face.c +428 -62
  26. data/ext/ca_obj_face.h +107 -47
  27. data/ext/ca_obj_fake.c +21 -50
  28. data/ext/ca_obj_farray.c +1 -0
  29. data/ext/ca_obj_field.c +16 -3
  30. data/ext/ca_obj_fixlen_string.c +39 -26
  31. data/ext/ca_obj_grid.c +181 -124
  32. data/ext/ca_obj_meld.c +235 -55
  33. data/ext/ca_obj_moncmp.c +61 -61
  34. data/ext/ca_obj_monop.c +125 -107
  35. data/ext/ca_obj_object.c +551 -233
  36. data/ext/ca_obj_record.c +51 -16
  37. data/ext/ca_obj_reduce.c +5 -8
  38. data/ext/ca_obj_refer.c +117 -33
  39. data/ext/ca_obj_remap.c +57 -17
  40. data/ext/ca_obj_repeat.c +21 -5
  41. data/ext/ca_obj_roll.c +115 -11
  42. data/ext/ca_obj_select.c +88 -75
  43. data/ext/ca_obj_select_axis.c +58 -60
  44. data/ext/ca_obj_shift.c +22 -102
  45. data/ext/ca_obj_stack.c +223 -123
  46. data/ext/ca_obj_stride.c +267 -35
  47. data/ext/ca_obj_string.c +25 -22
  48. data/ext/ca_obj_tile.c +32 -16
  49. data/ext/ca_obj_time.c +23 -25
  50. data/ext/ca_obj_timedelta.c +21 -23
  51. data/ext/ca_obj_transpose.c +12 -3
  52. data/ext/ca_obj_triop.c +110 -117
  53. data/ext/ca_obj_window.c +157 -29
  54. data/ext/ca_op_ipower.c +25 -13
  55. data/ext/ca_op_powi.h +57 -30
  56. data/ext/ca_pow5_table.h +656 -0
  57. data/ext/ca_rng_normal.h +42 -0
  58. data/ext/ca_rng_xoshiro256pp.h +105 -0
  59. data/ext/ca_sort_kernels.h +70 -0
  60. data/ext/ca_sweep_engine.c +385 -198
  61. data/ext/ca_sweep_engine.h +31 -23
  62. data/ext/ca_triop_dispatch.c +4 -1
  63. data/ext/ca_triop_dispatch.h +5 -2
  64. data/ext/caframe_csv_reader.c +463 -0
  65. data/ext/carray.h +90 -28
  66. data/ext/carray_access.c +487 -231
  67. data/ext/carray_address_basis.c +731 -0
  68. data/ext/carray_attribute.c +45 -3
  69. data/ext/carray_bincount.c +32 -2
  70. data/ext/carray_broadcast.c +49 -17
  71. data/ext/carray_call_cfunc.c +667 -511
  72. data/ext/carray_cast.c +1556 -247
  73. data/ext/carray_cast_func.rb +34 -21
  74. data/ext/carray_conversion.c +197 -73
  75. data/ext/carray_copy.c +84 -38
  76. data/ext/carray_core.c +591 -119
  77. data/ext/carray_count.c +148 -96
  78. data/ext/carray_element.c +18 -27
  79. data/ext/carray_factorize.c +604 -291
  80. data/ext/carray_generate.c +76 -40
  81. data/ext/carray_histogram.c +152 -94
  82. data/ext/carray_hold.c +2 -1
  83. data/ext/carray_index_classifier.c +63 -96
  84. data/ext/carray_internal.h +400 -1
  85. data/ext/carray_lazy.c +834 -79
  86. data/ext/carray_loop.c +88 -66
  87. data/ext/carray_mask.c +705 -324
  88. data/ext/carray_math_kernel.h +1 -0
  89. data/ext/carray_median_percentile.c +263 -63
  90. data/ext/carray_memory_view.c +254 -248
  91. data/ext/carray_operator.c +1093 -363
  92. data/ext/carray_order.c +133 -69
  93. data/ext/carray_partition.c +102 -56
  94. data/ext/carray_random.c +582 -204
  95. data/ext/carray_scatter.c +308 -65
  96. data/ext/carray_segment.c +257 -0
  97. data/ext/carray_slab.c +183 -70
  98. data/ext/carray_sort.c +235 -240
  99. data/ext/carray_sort_kernel.c +8 -1
  100. data/ext/carray_struct.c +99 -21
  101. data/ext/carray_test.c +167 -64
  102. data/ext/carray_time_text.c +1182 -0
  103. data/ext/carray_utils.c +363 -98
  104. data/ext/extconf.rb +27 -2
  105. data/ext/mk_call_cfunc.rb +103 -118
  106. data/ext/mk_pow5_table.rb +35 -0
  107. data/ext/mkkernel.rb +1349 -851
  108. data/ext/ruby_carray.c +17 -2
  109. data/ext/version.h +4 -4
  110. data/ext/version.rb +4 -2
  111. data/lib/carray/attribute.rb +39 -0
  112. data/lib/carray/autoload_carray.rb +24 -3
  113. data/lib/carray/autoload_method_extension.rb +18 -0
  114. data/lib/carray/axis_group.rb +245 -20
  115. data/lib/carray/basics.rb +95 -25
  116. data/lib/carray/bincount_nd.rb +6 -0
  117. data/lib/carray/block_iterator.rb +200 -54
  118. data/lib/carray/boolean_reduce.rb +21 -29
  119. data/lib/carray/categorical.rb +244 -59
  120. data/lib/carray/categorical_iterator.rb +391 -757
  121. data/lib/carray/complex.rb +36 -29
  122. data/lib/carray/conditional.rb +94 -7
  123. data/lib/carray/const_string.rb +177 -27
  124. data/lib/carray/construct.rb +40 -0
  125. data/lib/carray/data_type_extension.rb +3 -0
  126. data/lib/carray/data_type_limits.rb +91 -0
  127. data/lib/carray/fixlen_string.rb +1 -1
  128. data/lib/carray/frame/concat.rb +157 -6
  129. data/lib/carray/frame/convert.rb +13 -7
  130. data/lib/carray/frame/csv_parser.rb +590 -76
  131. data/lib/carray/frame/describe.rb +79 -0
  132. data/lib/carray/frame/frame.rb +205 -35
  133. data/lib/carray/frame/group.rb +199 -40
  134. data/lib/carray/frame/io.rb +452 -60
  135. data/lib/carray/frame/join.rb +134 -46
  136. data/lib/carray/frame/records.rb +54 -19
  137. data/lib/carray/frame/reshape.rb +448 -0
  138. data/lib/carray/frame/sort.rb +26 -2
  139. data/lib/carray/frame/verbs.rb +726 -56
  140. data/lib/carray/frame.rb +2 -0
  141. data/lib/carray/fuse_source.rb +111 -2
  142. data/lib/carray/fusion.rb +229 -38
  143. data/lib/carray/inspect.rb +71 -20
  144. data/lib/carray/iterator.rb +157 -2
  145. data/lib/carray/lazy.rb +54 -67
  146. data/lib/carray/mask_gap_fill.rb +66 -50
  147. data/lib/carray/math.rb +32 -19
  148. data/lib/carray/meld_reduce.rb +40 -7
  149. data/lib/carray/methods/align_addr.rb +8 -4
  150. data/lib/carray/methods/bincount.rb +2 -2
  151. data/lib/carray/methods/bit_string.rb +14 -3
  152. data/lib/carray/methods/composition.rb +16 -10
  153. data/lib/carray/methods/discovery_along.rb +74 -0
  154. data/lib/carray/methods/factorize.rb +50 -0
  155. data/lib/carray/methods/gather_nd.rb +13 -2
  156. data/lib/carray/methods/insert_block.rb +9 -14
  157. data/lib/carray/methods/is_in.rb +130 -6
  158. data/lib/carray/methods/join.rb +1 -1
  159. data/lib/carray/methods/locate_addr.rb +235 -21
  160. data/lib/carray/methods/mask_duplicates.rb +35 -1
  161. data/lib/carray/methods/mode.rb +18 -1
  162. data/lib/carray/methods/nunique.rb +22 -1
  163. data/lib/carray/methods/repeat.rb +91 -0
  164. data/lib/carray/methods/resize.rb +21 -23
  165. data/lib/carray/methods/snap.rb +34 -12
  166. data/lib/carray/methods/unique.rb +52 -3
  167. data/lib/carray/record_order.rb +208 -0
  168. data/lib/carray/rng.rb +86 -0
  169. data/lib/carray/runtime.rb +14 -11
  170. data/lib/carray/segment_iterator.rb +990 -0
  171. data/lib/carray/serialize.rb +197 -27
  172. data/lib/carray/slab_iterator.rb +109 -40
  173. data/lib/carray/stack.rb +10 -4
  174. data/lib/carray/string_operation_extension.rb +9 -4
  175. data/lib/carray/struct.rb +142 -51
  176. data/lib/carray/struct_builder.rb +110 -14
  177. data/lib/carray/table.rb +2 -2
  178. data/lib/carray/time.rb +535 -105
  179. data/lib/carray/window_iterator.rb +259 -82
  180. data/lib/carray.rb +4 -2
  181. data/yard-stubs/ca_obj_array.rb +4 -4
  182. data/yard-stubs/ca_obj_bitarray.rb +7 -0
  183. data/yard-stubs/ca_obj_bitfield.rb +23 -12
  184. data/yard-stubs/ca_obj_block.rb +2 -7
  185. data/yard-stubs/ca_obj_fake.rb +1 -1
  186. data/yard-stubs/ca_obj_field.rb +1 -1
  187. data/yard-stubs/ca_obj_refer.rb +3 -3
  188. data/yard-stubs/ca_obj_roll.rb +0 -1
  189. data/yard-stubs/ca_obj_stride.rb +10 -7
  190. data/yard-stubs/ca_obj_transpose.rb +1 -1
  191. data/yard-stubs/ca_obj_window.rb +11 -4
  192. data/yard-stubs/carray_access.rb +6 -5
  193. data/yard-stubs/carray_broadcast.rb +2 -2
  194. data/yard-stubs/carray_cast.rb +78 -43
  195. data/yard-stubs/carray_conversion.rb +13 -1
  196. data/yard-stubs/carray_copy.rb +8 -3
  197. data/yard-stubs/carray_core.rb +3 -83
  198. data/yard-stubs/carray_count.rb +16 -2
  199. data/yard-stubs/carray_lazy.rb +210 -1
  200. data/yard-stubs/carray_loop.rb +4 -1
  201. data/yard-stubs/carray_mask.rb +34 -10
  202. data/yard-stubs/carray_math.rb +1499 -4
  203. data/yard-stubs/carray_median_percentile.rb +26 -8
  204. data/yard-stubs/carray_order.rb +43 -82
  205. data/yard-stubs/carray_scatter.rb +10 -3
  206. data/yard-stubs/carray_segment.rb +72 -0
  207. data/yard-stubs/carray_slab.rb +11 -8
  208. data/yard-stubs/carray_sort.rb +50 -8
  209. data/yard-stubs/carray_test.rb +10 -0
  210. data/yard-stubs/carray_utils.rb +0 -26
  211. metadata +19 -19
  212. data/ext/ca_for_each_element.h +0 -239
  213. data/ext/carray_build_flags.h +0 -3
  214. data/ext/carray_config.h +0 -28
  215. data/ext/carray_kernels_bincmp.c +0 -4446
  216. data/ext/carray_kernels_binop.c +0 -11001
  217. data/ext/carray_kernels_init.c +0 -1131
  218. data/ext/carray_kernels_map.c +0 -3467
  219. data/ext/carray_kernels_moncmp.c +0 -2097
  220. data/ext/carray_kernels_monop.c +0 -18313
  221. data/ext/carray_kernels_reduce_aggregate.c +0 -25837
  222. data/ext/carray_kernels_reduce_boolean.c +0 -330
  223. data/ext/carray_kernels_reduce_cumulative.c +0 -14593
  224. data/ext/carray_kernels_reduce_extreme.c +0 -16948
  225. data/ext/carray_kernels_reduce_variance.c +0 -3910
  226. data/ext/carray_kernels_scan.c +0 -3693
  227. data/ext/carray_kernels_search.c +0 -32138
  228. data/ext/carray_kernels_sort.c +0 -10626
  229. data/ext/carray_kernels_triop.c +0 -1392
@@ -1,8 +1,17 @@
1
1
  # DOCUMENTATION ONLY — DO NOT REQUIRE.
2
2
  # Stubs for the elementwise arithmetic generated by ext/mkkernel.rb --
3
- # the division and modulo binops and the rounding monops. These
4
- # generated kernels carry no C docstring, so the documentation lives
5
- # here. See yard-stubs/README.md and yard-stubs/STYLE.md.
3
+ # the arithmetic, bitwise and logical operators, the comparison and
4
+ # predicate forms, the transcendental and angle functions, and the
5
+ # destructive counterpart of each. These generated kernels carry no C
6
+ # docstring, and lib/carray/lazy.rb redefines many of them through
7
+ # define_method for lazy dispatch, so neither side is visible to YARD
8
+ # and the documentation lives here.
9
+ #
10
+ # Every method below dispatches lazily: applied to a lazy view it
11
+ # builds a node in the expression tree instead of evaluating, and the
12
+ # eager and lazy paths are required to agree element for element.
13
+ #
14
+ # See yard-stubs/README.md and yard-stubs/STYLE.md.
6
15
 
7
16
  class CArray
8
17
  # @!group Elementwise math
@@ -16,12 +25,15 @@ class CArray
16
25
  # division is true division, as Ruby's `Float#/` is, so that
17
26
  # identity is an integer one. Boolean arrays participate as their
18
27
  # 0/1 storage. Masked elements stay masked, and a masked cell is
19
- # never divided.
28
+ # never divided. The signed minimum divided by `-1` does not fit and
29
+ # is answered as the wrapped negation: `MIN / -1` is `MIN`.
20
30
  # @param other [CArray, Numeric] divisor, broadcast to `self.shape`.
21
31
  # @return [CArray] result of the promoted `data_type` of the two
22
32
  # operands.
23
33
  # @raise [ZeroDivisionError] when an integer divisor is `0`. Float
24
34
  # division returns `Infinity` or `NaN` instead.
35
+ # @raise [RangeError] when an Integer `other` does not fit the
36
+ # integer `data_type` of `self`.
25
37
  # @example
26
38
  # CA_INT32([-7, -1, 7]) / 3 # => [ -3, -1, 2 ]
27
39
  # CA_DOUBLE([-7.0]) / 3.0 # => [ -2.3333333333333335 ]
@@ -128,5 +140,1488 @@ class CArray
128
140
  # @return [CArray] same `data_type` as `self`.
129
141
  def frac; end
130
142
 
143
+ # @overload +(other)
144
+ # Returns the element-wise sum of `self` and `other`.
145
+ #
146
+ # Works on every numeric and complex `data_type`, and on `:object`
147
+ # (where each element receives Ruby `+`, so `Rational` and
148
+ # `BigDecimal` stay exact). Boolean arrays participate as their 0/1
149
+ # storage and promote to `:int64`, so a difference can reach `-1`.
150
+ # Masked elements stay masked.
151
+ # @param other [CArray, Numeric] addend, broadcast to `self.shape`.
152
+ # @return [CArray] result of the promoted `data_type` of the two
153
+ # operands.
154
+ # @example
155
+ # CA_INT32([1, 2]) + 10 # => [ 11, 12 ]
156
+ def +(other); end
157
+
158
+ # @overload add(other)
159
+ # Alias of {#+}.
160
+ # @param other [CArray, Numeric] addend.
161
+ # @return [CArray]
162
+ def add(other); end
163
+
164
+ # @overload -(other)
165
+ # Returns the element-wise difference of `self` and `other`.
166
+ # Follows {#+} in every respect.
167
+ # @param other [CArray, Numeric] subtrahend, broadcast to `self.shape`.
168
+ # @return [CArray] result of the promoted `data_type` of the two
169
+ # operands.
170
+ def -(other); end
171
+
172
+ # @overload sub(other)
173
+ # Alias of {#-}.
174
+ # @param other [CArray, Numeric] subtrahend.
175
+ # @return [CArray]
176
+ def sub(other); end
177
+
178
+ # @overload *(other)
179
+ # Returns the element-wise product of `self` and `other`.
180
+ #
181
+ # A `:cmplx64` product is formed in double precision before being
182
+ # rounded back, because the two products a complex multiply
183
+ # subtracts can cancel; the extra width is spent on accuracy, not
184
+ # speed. Otherwise as {#+}.
185
+ # @param other [CArray, Numeric] multiplier, broadcast to `self.shape`.
186
+ # @return [CArray] result of the promoted `data_type` of the two
187
+ # operands.
188
+ def *(other); end
189
+
190
+ # @overload mul(other)
191
+ # Alias of {#*}.
192
+ # @param other [CArray, Numeric] multiplier.
193
+ # @return [CArray]
194
+ def mul(other); end
195
+
196
+ # @overload **(other)
197
+ # Returns `self` raised element-wise to the power `other`.
198
+ #
199
+ # The result keeps the promoted `data_type` of the operands, so an
200
+ # integer base with a negative integer exponent truncates toward
201
+ # zero rather than producing a fraction (`2 ** -1` is `0`). Cast to
202
+ # a float `data_type` first when a fractional power is wanted.
203
+ # Masked elements stay masked.
204
+ # @param other [CArray, Numeric] exponent, broadcast to `self.shape`.
205
+ # @return [CArray] result of the promoted `data_type` of the two
206
+ # operands.
207
+ # @example
208
+ # CA_INT32([2, 3]) ** 3 # => [ 8, 27 ]
209
+ # CA_INT32([2]) ** -1 # => [ 0 ]
210
+ def **(other); end
211
+
212
+ # @overload power(other)
213
+ # Alias of {#**}.
214
+ # @param other [CArray, Numeric] exponent.
215
+ # @return [CArray]
216
+ def power(other); end
217
+
218
+ # @overload rcp_mul(other)
219
+ # Returns `other` divided element-wise by `self` -- the reciprocal
220
+ # of {#/} in operand order, so that scaling a constant by an array
221
+ # needs no temporary. Integer division floors, as {#/} does.
222
+ # @param other [CArray, Numeric] dividend, broadcast to `self.shape`.
223
+ # @return [CArray] result of the promoted `data_type` of the two
224
+ # operands.
225
+ # @raise [ZeroDivisionError] when an integer element of `self` is `0`.
226
+ # @example
227
+ # CA_DOUBLE([1.0, 2.0, 4.0]).rcp_mul(2.0) # => [ 2.0, 1.0, 0.5 ]
228
+ def rcp_mul(other); end
229
+
230
+ # @overload -@
231
+ # Returns the element-wise negation of `self`, keeping `self`'s
232
+ # `data_type`. A boolean array promotes to `:int64`. An `:object`
233
+ # array delegates to each element's `#-@`.
234
+ # @return [CArray]
235
+ def -@; end
236
+
237
+ # @overload neg
238
+ # Alias of {#-@}.
239
+ # @return [CArray]
240
+ def neg; end
241
+
242
+ # @overload abs
243
+ # Returns the element-wise magnitude of `self`.
244
+ #
245
+ # A numeric array keeps its `data_type`; a complex array returns the
246
+ # real magnitude at that complex type's own width, so a `:cmplx64`
247
+ # yields `:float32` just as {#real} and {#imag} do. An `:object`
248
+ # array calls each cell's `abs`. For the form that keeps a complex
249
+ # array complex (magnitude with a zero imaginary part) use {#abs_i}.
250
+ # @return [CArray] `self`'s `data_type` for numeric and `:object`
251
+ # input; the real component type for complex input.
252
+ # @raise [CArray::DataTypeError] for a boolean array.
253
+ # @example
254
+ # CA_CMPLX64([Complex(3, 4)]).abs # => [ 5.0 ] (:float32)
255
+ def abs; end
256
+
257
+ # @overload abs_i
258
+ # Returns the element-wise magnitude of `self`, keeping `self`'s
259
+ # `data_type` -- a complex array stays complex (imaginary part
260
+ # zero), a boolean promotes to `:int64`, and an `:object` array
261
+ # delegates to each element's `#abs`. See {#abs} for the form that
262
+ # returns a real magnitude from a complex array.
263
+ # @return [CArray] same `data_type` as `self` (`:int64` for boolean).
264
+ def abs_i; end
265
+
266
+ # @overload square
267
+ # Returns `self * self` element-wise, keeping `self`'s `data_type`
268
+ # (a boolean promotes to `:int64`).
269
+ # @return [CArray]
270
+ def square; end
271
+
272
+ # @overload rcp
273
+ # Returns the element-wise reciprocal `1 / self`, keeping `self`'s
274
+ # `data_type`. On an integer array the quotient is an integer, so
275
+ # every element but `±1` becomes `0`; cast first when that is not
276
+ # wanted.
277
+ # @return [CArray] same `data_type` as `self`.
278
+ # @raise [ZeroDivisionError] when an integer element is `0`.
279
+ # @raise [CArray::DataTypeError] for a boolean array.
280
+ def rcp; end
281
+
282
+ # @overload rsqrt
283
+ # Returns the element-wise reciprocal square root `1 / sqrt(self)`.
284
+ # A float array keeps its width and a complex array stays complex;
285
+ # an integer array promotes to `:float64`.
286
+ # @return [CArray] `:float64`, or `self`'s own float/complex type.
287
+ # @raise [CArray::DataTypeError] for a boolean array.
288
+ # @example
289
+ # CA_DOUBLE([4.0, 16.0]).rsqrt # => [ 0.5, 0.25 ]
290
+ def rsqrt; end
291
+
292
+ # @overload sign
293
+ # Returns `-1`, `0`, or `1` element-wise according to the sign of
294
+ # each element, keeping `self`'s `data_type` (so a float array
295
+ # yields `-1.0` / `0.0` / `1.0`).
296
+ # @return [CArray] same `data_type` as `self`.
297
+ # @raise [CArray::DataTypeError] for an `:object` array.
298
+ # @example
299
+ # CA_DOUBLE([-3.0, 0.0, 2.0]).sign # => [ -1.0, 0.0, 1.0 ]
300
+ def sign; end
301
+
302
+ # @overload zero
303
+ # Returns an array of the same shape and `data_type` as `self` with
304
+ # every element set to zero. The mask is carried over.
305
+ # @return [CArray]
306
+ def zero; end
307
+
308
+ # @overload one
309
+ # Returns an array of the same shape and `data_type` as `self` with
310
+ # every element set to one. The mask is carried over.
311
+ # @return [CArray]
312
+ def one; end
313
+
314
+ # @overload conj
315
+ # Returns the element-wise complex conjugate. A real array is
316
+ # returned with its values unchanged (a boolean promotes to
317
+ # `:int64`), so the operation is safe to apply without testing for
318
+ # a complex `data_type`.
319
+ # @return [CArray] same `data_type` as `self`.
320
+ def conj; end
321
+
322
+ # @overload arg
323
+ # Returns the element-wise argument (phase angle, in radians) of
324
+ # `self`, in `(-pi, pi]`.
325
+ #
326
+ # A complex array yields its real component type (`:cmplx64` ->
327
+ # `:float32`); a float array keeps its width; an integer array
328
+ # promotes to `:float64`, because a negative element has argument
329
+ # `pi` and would otherwise be truncated.
330
+ # @return [CArray] `:float64` for integer input, otherwise the real
331
+ # component type of `self`.
332
+ # @raise [CArray::DataTypeError] for a boolean or `:object` array.
333
+ # @example
334
+ # CA_DOUBLE([-1.0, 1.0]).arg # => [ 3.141592653589793, 0.0 ]
335
+ def arg; end
336
+
337
+ # @overload imag_i
338
+ # Returns the element-wise imaginary part, keeping `self`'s
339
+ # `data_type` -- a complex array stays complex (real part zero) and
340
+ # a real array yields zeros. See {#imag} for the real-valued form.
341
+ # @return [CArray] same `data_type` as `self` (`:int64` for boolean).
342
+ def imag_i; end
343
+
344
+ # @overload floor
345
+ # Returns the element-wise largest integral value not greater than
346
+ # each element, keeping `self`'s `data_type` (a `:float64` stays
347
+ # `:float64`). Integer arrays are returned unchanged; an `:object`
348
+ # array delegates to each element's `#floor`.
349
+ # @return [CArray] same `data_type` as `self`.
350
+ # @raise [CArray::DataTypeError] for a complex array.
351
+ def floor; end
352
+
353
+ # @overload ceil
354
+ # Returns the element-wise smallest integral value not less than
355
+ # each element, keeping `self`'s `data_type`. Otherwise as {#floor}.
356
+ # @return [CArray] same `data_type` as `self`.
357
+ # @raise [CArray::DataTypeError] for a complex array.
358
+ def ceil; end
359
+
360
+ # @overload trunc
361
+ # Returns each element with its fractional part removed (rounded
362
+ # toward zero), keeping `self`'s `data_type`. This is the companion
363
+ # of {#frac}: `self.trunc + self.frac == self`.
364
+ # @return [CArray] same `data_type` as `self`.
365
+ # @raise [CArray::DataTypeError] for a complex array.
366
+ def trunc; end
367
+
368
+ # @overload sqrt
369
+ # Returns the element-wise square root.
370
+ #
371
+ # A float array keeps its width (a `:float32` is computed and
372
+ # returned in single precision), a complex array stays complex, and
373
+ # an integer array promotes to `:float64`. A negative element of a
374
+ # real array yields `NaN`; take `.to_type(:cmplx128)` first to get
375
+ # the complex root instead.
376
+ # @return [CArray] `:float64` for integer input, otherwise `self`'s
377
+ # own float or complex type.
378
+ # @raise [CArray::DataTypeError] for a boolean array.
379
+ def sqrt; end
380
+
381
+ # @overload exp
382
+ # Returns `e` raised element-wise to each element of `self`.
383
+ # Type behaviour as {#sqrt}.
384
+ # @return [CArray]
385
+ # @raise [CArray::DataTypeError] for a boolean array.
386
+ def exp; end
387
+
388
+ # @overload exp2
389
+ # Returns `2` raised element-wise to each element of `self`.
390
+ # Type behaviour as {#sqrt}.
391
+ # @return [CArray]
392
+ # @raise [CArray::DataTypeError] for a boolean array.
393
+ def exp2; end
394
+
395
+ # @overload exp10
396
+ # Returns `10` raised element-wise to each element of `self`.
397
+ # Type behaviour as {#sqrt}.
398
+ # @return [CArray]
399
+ # @raise [CArray::DataTypeError] for a boolean array.
400
+ def exp10; end
401
+
402
+ # @overload expm1
403
+ # Returns `exp(self) - 1` element-wise, accurate for elements near
404
+ # zero where computing the subtraction directly would cancel.
405
+ # Real `data_type`s only.
406
+ # @return [CArray] `:float64` for integer input, otherwise `self`'s
407
+ # own float type.
408
+ # @raise [CArray::DataTypeError] for a boolean or complex array.
409
+ def expm1; end
410
+
411
+ # @overload log
412
+ # Returns the element-wise natural logarithm. Type behaviour as
413
+ # {#sqrt}. A negative element of a real array yields `NaN` and a
414
+ # zero element yields `-Infinity`.
415
+ #
416
+ # The complex branch is computed in double precision even for
417
+ # `:cmplx64`: the real part of `log(z)` is `log|z|`, which vanishes
418
+ # on the unit circle, so measuring `|z|` at the narrower width
419
+ # would round away what the logarithm then needs.
420
+ # @return [CArray]
421
+ # @raise [CArray::DataTypeError] for a boolean array.
422
+ def log; end
423
+
424
+ # @overload log2
425
+ # Returns the element-wise base-2 logarithm. Real `data_type`s only.
426
+ # @return [CArray] `:float64` for integer input, otherwise `self`'s
427
+ # own float type.
428
+ # @raise [CArray::DataTypeError] for a boolean or complex array.
429
+ def log2; end
430
+
431
+ # @overload log10
432
+ # Returns the element-wise base-10 logarithm. Real `data_type`s only.
433
+ # @return [CArray] `:float64` for integer input, otherwise `self`'s
434
+ # own float type.
435
+ # @raise [CArray::DataTypeError] for a boolean or complex array.
436
+ def log10; end
437
+
438
+ # @overload log1p
439
+ # Returns `log(1 + self)` element-wise, accurate for elements near
440
+ # zero. Real `data_type`s only.
441
+ # @return [CArray] `:float64` for integer input, otherwise `self`'s
442
+ # own float type.
443
+ # @raise [CArray::DataTypeError] for a boolean or complex array.
444
+ def log1p; end
445
+
446
+ # @overload logb
447
+ # Returns the exponent of each element in the floating-point radix,
448
+ # as a floating-point value: `8.0` yields `3.0` and `0.5` yields
449
+ # `-1.0`. Real `data_type`s only.
450
+ # @return [CArray] `:float64` for integer input, otherwise `self`'s
451
+ # own float type.
452
+ # @raise [CArray::DataTypeError] for a boolean or complex array.
453
+ # @example
454
+ # CA_DOUBLE([8.0, 1.0, 0.5]).logb # => [ 3.0, 0.0, -1.0 ]
455
+ def logb; end
456
+
457
+ # @overload sin
458
+ # Returns the element-wise sine, the argument taken in radians.
459
+ # Type behaviour as {#sqrt}.
460
+ # @return [CArray]
461
+ # @raise [CArray::DataTypeError] for a boolean array.
462
+ def sin; end
463
+
464
+ # @overload cos
465
+ # Returns the element-wise cosine, the argument taken in radians.
466
+ # Type behaviour as {#sqrt}.
467
+ # @return [CArray]
468
+ # @raise [CArray::DataTypeError] for a boolean array.
469
+ def cos; end
470
+
471
+ # @overload tan
472
+ # Returns the element-wise tangent, the argument taken in radians.
473
+ # Type behaviour as {#sqrt}.
474
+ # @return [CArray]
475
+ # @raise [CArray::DataTypeError] for a boolean array.
476
+ def tan; end
477
+
478
+ # @overload asin
479
+ # Returns the element-wise arc sine, in radians. Type behaviour as
480
+ # {#sqrt}. An element of a real array outside `[-1, 1]` yields
481
+ # `NaN`; a complex array has no such restriction.
482
+ # @return [CArray]
483
+ # @raise [CArray::DataTypeError] for a boolean array.
484
+ def asin; end
485
+
486
+ # @overload acos
487
+ # Returns the element-wise arc cosine, in radians. Otherwise as
488
+ # {#asin}.
489
+ # @return [CArray]
490
+ # @raise [CArray::DataTypeError] for a boolean array.
491
+ def acos; end
492
+
493
+ # @overload atan
494
+ # Returns the element-wise arc tangent, in radians, in
495
+ # `(-pi/2, pi/2)`. For the two-argument form that resolves the
496
+ # quadrant see {#atan2}.
497
+ # @return [CArray]
498
+ # @raise [CArray::DataTypeError] for a boolean array.
499
+ def atan; end
500
+
501
+ # @overload sinh
502
+ # Returns the element-wise hyperbolic sine. Type behaviour as
503
+ # {#sqrt}.
504
+ # @return [CArray]
505
+ # @raise [CArray::DataTypeError] for a boolean array.
506
+ def sinh; end
507
+
508
+ # @overload cosh
509
+ # Returns the element-wise hyperbolic cosine. Type behaviour as
510
+ # {#sqrt}.
511
+ # @return [CArray]
512
+ # @raise [CArray::DataTypeError] for a boolean array.
513
+ def cosh; end
514
+
515
+ # @overload tanh
516
+ # Returns the element-wise hyperbolic tangent. Type behaviour as
517
+ # {#sqrt}.
518
+ # @return [CArray]
519
+ # @raise [CArray::DataTypeError] for a boolean array.
520
+ def tanh; end
521
+
522
+ # @overload asinh
523
+ # Returns the element-wise inverse hyperbolic sine. Type behaviour
524
+ # as {#sqrt}.
525
+ # @return [CArray]
526
+ # @raise [CArray::DataTypeError] for a boolean array.
527
+ def asinh; end
528
+
529
+ # @overload acosh
530
+ # Returns the element-wise inverse hyperbolic cosine. Type
531
+ # behaviour as {#sqrt}. An element of a real array below `1` yields
532
+ # `NaN`.
533
+ # @return [CArray]
534
+ # @raise [CArray::DataTypeError] for a boolean array.
535
+ def acosh; end
536
+
537
+ # @overload atanh
538
+ # Returns the element-wise inverse hyperbolic tangent. Type
539
+ # behaviour as {#sqrt}. An element of a real array outside
540
+ # `(-1, 1)` yields `NaN` or `±Infinity`.
541
+ # @return [CArray]
542
+ # @raise [CArray::DataTypeError] for a boolean array.
543
+ def atanh; end
544
+
545
+ # @overload atan2(other)
546
+ # Returns the element-wise arc tangent of `self / other` in
547
+ # radians, using the signs of both to place the result in the
548
+ # correct quadrant, in `(-pi, pi]`. `self` is the ordinate.
549
+ #
550
+ # Unlike the one-argument transcendentals, the two-argument float
551
+ # functions do not promote integers: they accept float and
552
+ # `:object` arrays only.
553
+ # @param other [CArray, Numeric] the abscissa, broadcast to
554
+ # `self.shape`.
555
+ # @return [CArray] `self`'s own float type.
556
+ # @raise [CArray::DataTypeError] for an integer, boolean, or
557
+ # complex array.
558
+ def atan2(other); end
559
+
560
+ # @overload hypot(other)
561
+ # Returns `sqrt(self ** 2 + other ** 2)` element-wise, computed
562
+ # without the overflow that squaring the operands directly would
563
+ # cause. Accepts float and `:object` arrays only, as {#atan2}.
564
+ # @param other [CArray, Numeric] the other leg, broadcast to
565
+ # `self.shape`.
566
+ # @return [CArray] `self`'s own float type.
567
+ # @raise [CArray::DataTypeError] for an integer, boolean, or
568
+ # complex array.
569
+ def hypot(other); end
570
+
571
+ # @overload copysign(other)
572
+ # Returns each element of `self` with the magnitude it already has
573
+ # and the sign of the matching element of `other`. The sign of a
574
+ # zero is respected, so `copysign` distinguishes `-0.0` from `0.0`.
575
+ # Accepts float and `:object` arrays only, as {#atan2}.
576
+ # @param other [CArray, Numeric] sign source, broadcast to
577
+ # `self.shape`.
578
+ # @return [CArray] `self`'s own float type.
579
+ # @raise [CArray::DataTypeError] for an integer, boolean, or
580
+ # complex array.
581
+ def copysign(other); end
582
+
583
+ # @overload nextafter(other)
584
+ # Returns the next representable value after each element of `self`
585
+ # in the direction of `other`, stepping by one unit in the last
586
+ # place of `self`'s own float type. Accepts float and `:object`
587
+ # arrays only, as {#atan2}.
588
+ # @param other [CArray, Numeric] direction, broadcast to
589
+ # `self.shape`.
590
+ # @return [CArray] `self`'s own float type.
591
+ # @raise [CArray::DataTypeError] for an integer, boolean, or
592
+ # complex array.
593
+ def nextafter(other); end
594
+
595
+ # @overload logaddexp(other)
596
+ # Returns `log(exp(self) + exp(other))` element-wise, computed
597
+ # without the overflow that exponentiating large elements directly
598
+ # would cause -- the usual way to add probabilities held as
599
+ # logarithms. Accepts float and `:object` arrays only, as {#atan2}.
600
+ # @param other [CArray, Numeric] the other log-value, broadcast to
601
+ # `self.shape`.
602
+ # @return [CArray] `self`'s own float type.
603
+ # @raise [CArray::DataTypeError] for an integer, boolean, or
604
+ # complex array.
605
+ def logaddexp(other); end
606
+
607
+ # @overload deg
608
+ # Returns each element converted from radians to degrees.
609
+ # @return [CArray] `:float64` for integer input, otherwise `self`'s
610
+ # own float type.
611
+ # @raise [CArray::DataTypeError] for a boolean or complex array.
612
+ def deg; end
613
+
614
+ # @overload rad
615
+ # Returns each element converted from degrees to radians.
616
+ # @return [CArray] `:float64` for integer input, otherwise `self`'s
617
+ # own float type.
618
+ # @raise [CArray::DataTypeError] for a boolean or complex array.
619
+ def rad; end
620
+
621
+ # @overload deg_180
622
+ # Returns each element, taken in degrees, wrapped into the interval
623
+ # `(-180, 180]`.
624
+ # @return [CArray] `:float64` for integer input, otherwise `self`'s
625
+ # own float type.
626
+ # @raise [CArray::DataTypeError] for a boolean or complex array.
627
+ # @example
628
+ # CA_DOUBLE([270.0]).deg_180 # => [ -90.0 ]
629
+ def deg_180; end
630
+
631
+ # @overload deg_360
632
+ # Returns each element, taken in degrees, wrapped into the interval
633
+ # `[0, 360)`.
634
+ # @return [CArray] `:float64` for integer input, otherwise `self`'s
635
+ # own float type.
636
+ # @raise [CArray::DataTypeError] for a boolean or complex array.
637
+ # @example
638
+ # CA_DOUBLE([-10.0]).deg_360 # => [ 350.0 ]
639
+ def deg_360; end
640
+
641
+ # @overload rad_pi
642
+ # Returns each element, taken in radians, wrapped into the interval
643
+ # `(-pi, pi]` -- the radian counterpart of {#deg_180}.
644
+ # @return [CArray] `:float64` for integer input, otherwise `self`'s
645
+ # own float type.
646
+ # @raise [CArray::DataTypeError] for a boolean or complex array.
647
+ def rad_pi; end
648
+
649
+ # @overload rad_2pi
650
+ # Returns each element, taken in radians, wrapped into the interval
651
+ # `[0, 2*pi)` -- the radian counterpart of {#deg_360}.
652
+ # @return [CArray] `:float64` for integer input, otherwise `self`'s
653
+ # own float type.
654
+ # @raise [CArray::DataTypeError] for a boolean or complex array.
655
+ def rad_2pi; end
656
+
657
+ # @overload pmax(other)
658
+ # Returns the element-wise larger of `self` and `other`, ignoring
659
+ # `NaN`: where one element is `NaN` the other is returned, and only
660
+ # two `NaN`s give `NaN`. This is C's `fmax`. For the form that lets
661
+ # a `NaN` win see {#maximum}.
662
+ # @param other [CArray, Numeric] the other operand, broadcast to
663
+ # `self.shape`.
664
+ # @return [CArray] result of the promoted `data_type` of the two
665
+ # operands (`:int64` for boolean).
666
+ # @raise [CArray::DataTypeError] for a complex array, which has no
667
+ # ordering.
668
+ # @example
669
+ # CA_DOUBLE([Float::NAN]).pmax(1.0) # => [ 1.0 ]
670
+ def pmax(other); end
671
+
672
+ # @overload pmin(other)
673
+ # Returns the element-wise smaller of `self` and `other`, ignoring
674
+ # `NaN`. The counterpart of {#pmax}.
675
+ # @param other [CArray, Numeric] the other operand.
676
+ # @return [CArray]
677
+ # @raise [CArray::DataTypeError] for a complex array.
678
+ def pmin(other); end
679
+
680
+ # @overload fmax(other)
681
+ # Alias of {#pmax}, under the name C gives it.
682
+ # @param other [CArray, Numeric] the other operand.
683
+ # @return [CArray]
684
+ def fmax(other); end
685
+
686
+ # @overload fmin(other)
687
+ # Alias of {#pmin}, under the name C gives it.
688
+ # @param other [CArray, Numeric] the other operand.
689
+ # @return [CArray]
690
+ def fmin(other); end
691
+
692
+ # @overload maximum(other)
693
+ # Returns the element-wise larger of `self` and `other`,
694
+ # propagating `NaN`: where either element is `NaN` the result is
695
+ # `NaN`. Use this when a `NaN` must not be silently dropped, and
696
+ # {#pmax} when it should be skipped.
697
+ # @param other [CArray, Numeric] the other operand, broadcast to
698
+ # `self.shape`.
699
+ # @return [CArray] result of the promoted `data_type` of the two
700
+ # operands (`:int64` for boolean).
701
+ # @raise [CArray::DataTypeError] for a complex array.
702
+ # @example
703
+ # CA_DOUBLE([Float::NAN]).maximum(1.0) # => [ NaN ]
704
+ def maximum(other); end
705
+
706
+ # @overload minimum(other)
707
+ # Returns the element-wise smaller of `self` and `other`,
708
+ # propagating `NaN`. The counterpart of {#maximum}.
709
+ # @param other [CArray, Numeric] the other operand.
710
+ # @return [CArray]
711
+ # @raise [CArray::DataTypeError] for a complex array.
712
+ def minimum(other); end
713
+
714
+ # @overload fma(a, b)
715
+ # Returns `self * a + b` element-wise, evaluated as one fused
716
+ # operation so no temporary array is built for the product.
717
+ # @param a [CArray, Numeric] multiplier, broadcast to `self.shape`.
718
+ # @param b [CArray, Numeric] addend, broadcast to `self.shape`.
719
+ # @return [CArray] result of the promoted `data_type` of the three
720
+ # operands.
721
+ # @example
722
+ # CA_DOUBLE([2.0]).fma(3.0, 4.0) # => [ 10.0 ]
723
+ def fma(a, b); end
724
+
725
+ # @overload fms(a, b)
726
+ # Returns `self * a - b` element-wise, the subtracting counterpart
727
+ # of {#fma}.
728
+ # @param a [CArray, Numeric] multiplier.
729
+ # @param b [CArray, Numeric] subtrahend.
730
+ # @return [CArray]
731
+ # @example
732
+ # CA_DOUBLE([2.0]).fms(3.0, 4.0) # => [ 2.0 ]
733
+ def fms(a, b); end
734
+
735
+ # @overload eq(other)
736
+ # Returns a boolean array that is true where `self` and `other` are
737
+ # equal element-wise. Distinct from {#==}, which compares two
738
+ # arrays as wholes and returns a single `true` or `false`.
739
+ #
740
+ # Accepts every numeric, complex, boolean, `:fixlen` (byte
741
+ # comparison) and `:object` (Ruby `==`) `data_type`. A masked
742
+ # element yields a masked result rather than `false`. Floating
743
+ # point equality is exact here; for a tolerant comparison see
744
+ # {#is_close} (absolute) or {#is_equiv} (relative). Integers compare
745
+ # by value, as for {#<}.
746
+ # @param other [CArray, Numeric, Object] comparand, broadcast to
747
+ # `self.shape`.
748
+ # @return [CArray] `:boolean`, same shape as `self`.
749
+ # @example
750
+ # CA_DOUBLE([1.0, 2.0]).eq(2.0) # => [ false, true ]
751
+ def eq(other); end
752
+
753
+ # @overload ne(other)
754
+ # Returns a boolean array that is true where `self` and `other`
755
+ # differ element-wise. The negation of {#eq}.
756
+ # @param other [CArray, Numeric, Object] comparand.
757
+ # @return [CArray] `:boolean`.
758
+ def ne(other); end
759
+
760
+ # @overload <(other)
761
+ # Returns a boolean array that is true where each element of `self`
762
+ # is less than the matching element of `other`.
763
+ #
764
+ # Accepts numeric, boolean, `:fixlen` (byte order, shorter first on
765
+ # a common prefix) and `:object` (Ruby `<`) `data_type`s. Complex
766
+ # arrays have no ordering and raise.
767
+ #
768
+ # Integers compare by value: an unsigned array against a signed one
769
+ # answers as the Integers would (`CA_UINT64([7]) < CA_INT64([-7])`
770
+ # is false), and so does an Integer the array's type cannot hold
771
+ # (`CA_UINT8([0]) > -1` is true).
772
+ # @param other [CArray, Numeric, Object] comparand, broadcast to
773
+ # `self.shape`.
774
+ # @return [CArray] `:boolean`, same shape as `self`.
775
+ # @raise [TypeError] for a complex array.
776
+ def <(other); end
777
+
778
+ # @overload lt(other)
779
+ # Alias of {#<}.
780
+ # @param other [CArray, Numeric, Object] comparand.
781
+ # @return [CArray] `:boolean`.
782
+ def lt(other); end
783
+
784
+ # @overload <=(other)
785
+ # Returns a boolean array that is true where each element of `self`
786
+ # is less than or equal to the matching element of `other`.
787
+ # Otherwise as {#<}.
788
+ # @param other [CArray, Numeric, Object] comparand.
789
+ # @return [CArray] `:boolean`.
790
+ # @raise [TypeError] for a complex array.
791
+ def <=(other); end
792
+
793
+ # @overload le(other)
794
+ # Alias of {#<=}.
795
+ # @param other [CArray, Numeric, Object] comparand.
796
+ # @return [CArray] `:boolean`.
797
+ def le(other); end
798
+
799
+ # @overload >(other)
800
+ # Returns a boolean array that is true where each element of `self`
801
+ # is greater than the matching element of `other`. Otherwise as
802
+ # {#<}.
803
+ # @param other [CArray, Numeric, Object] comparand.
804
+ # @return [CArray] `:boolean`.
805
+ # @raise [TypeError] for a complex array.
806
+ def >(other); end
807
+
808
+ # @overload gt(other)
809
+ # Alias of {#>}.
810
+ # @param other [CArray, Numeric, Object] comparand.
811
+ # @return [CArray] `:boolean`.
812
+ def gt(other); end
813
+
814
+ # @overload >=(other)
815
+ # Returns a boolean array that is true where each element of `self`
816
+ # is greater than or equal to the matching element of `other`.
817
+ # Otherwise as {#<}.
818
+ # @param other [CArray, Numeric, Object] comparand.
819
+ # @return [CArray] `:boolean`.
820
+ # @raise [TypeError] for a complex array.
821
+ def >=(other); end
822
+
823
+ # @overload ge(other)
824
+ # Alias of {#>=}.
825
+ # @param other [CArray, Numeric, Object] comparand.
826
+ # @return [CArray] `:boolean`.
827
+ def ge(other); end
828
+
829
+ # @overload feq(other)
830
+ # Returns a boolean array that is true where `self` and `other`
831
+ # agree element-wise to within the machine epsilon of `self`'s
832
+ # float type, scaled by the larger of the two magnitudes. Use it
833
+ # instead of {#eq} when comparing computed floating-point values.
834
+ # For an explicit tolerance see {#is_close} and {#is_equiv}.
835
+ # @param other [CArray, Numeric] comparand, broadcast to
836
+ # `self.shape`.
837
+ # @return [CArray] `:boolean`.
838
+ # @raise [TypeError] for any non-float `data_type`.
839
+ def feq(other); end
840
+
841
+ # @overload is_close(other, tolerance)
842
+ # Returns a boolean array that is true where `self` and `other`
843
+ # agree element-wise within an **absolute** tolerance:
844
+ # `|self - other| <= tolerance`. Complex arrays compare by the
845
+ # magnitude of the difference.
846
+ # @param other [CArray, Numeric] comparand, broadcast to
847
+ # `self.shape`.
848
+ # @param tolerance [Numeric] largest accepted absolute difference.
849
+ # @return [CArray] `:boolean`.
850
+ # @example
851
+ # CA_DOUBLE([1000.0]).is_close(1001.0, 1.0) # => [ true ]
852
+ def is_close(other, tolerance); end
853
+
854
+ # @overload is_equiv(other, tolerance)
855
+ # Returns a boolean array that is true where `self` and `other`
856
+ # agree element-wise within a **relative** tolerance:
857
+ # `|self - other| / max(|self|, |other|) <= tolerance`, with
858
+ # exactly equal elements always true. Prefer this to {#is_close}
859
+ # when the elements span several orders of magnitude.
860
+ # @param other [CArray, Numeric] comparand, broadcast to
861
+ # `self.shape`.
862
+ # @param tolerance [Numeric] largest accepted relative difference.
863
+ # @return [CArray] `:boolean`.
864
+ # @example
865
+ # CA_DOUBLE([1000.0]).is_equiv(1001.0, 0.01) # => [ true ]
866
+ # CA_DOUBLE([0.001]).is_equiv(0.002, 0.01) # => [ false ]
867
+ def is_equiv(other, tolerance); end
868
+
869
+ # @overload is_nan
870
+ # Returns a boolean array that is true where an element is `NaN`.
871
+ # @return [CArray] `:boolean`, same shape as `self`.
872
+ # @raise [CArray::DataTypeError] for a boolean array.
873
+ # On an `:object` array an Integer or a Rational element is never
874
+ # `NaN`; other elements answer through `#nan?`.
875
+ # @raise [NoMethodError] for an `:object` array with an element that
876
+ # is not an Integer, a Rational or a Float and does not respond to
877
+ # `#nan?`.
878
+ def is_nan; end
879
+
880
+ # @overload is_inf
881
+ # Returns a boolean array that is true where an element is
882
+ # positive or negative infinity.
883
+ # @return [CArray] `:boolean`.
884
+ # @raise [CArray::DataTypeError] for a boolean array.
885
+ def is_inf; end
886
+
887
+ # @overload is_finite
888
+ # Returns a boolean array that is true where an element is neither
889
+ # `NaN` nor infinite.
890
+ # @return [CArray] `:boolean`.
891
+ # @raise [CArray::DataTypeError] for a boolean array.
892
+ def is_finite; end
893
+
894
+ # @overload is_invalid
895
+ # Returns a boolean array that is true where an element is `NaN` or
896
+ # infinite -- the negation of {#is_finite}, in one pass. Pair it
897
+ # with {#mask_where} to mask the elements a computation cannot use.
898
+ # @return [CArray] `:boolean`.
899
+ # @example
900
+ # CA_DOUBLE([Float::NAN, 1.0/0, 1.0]).is_invalid # => [ true, true, false ]
901
+ def is_invalid; end
902
+
903
+ # @overload signbit
904
+ # Returns a boolean array that is true where an element carries a
905
+ # negative sign bit. A negative zero is true, which distinguishes
906
+ # `-0.0` from `0.0` where a `< 0` comparison cannot.
907
+ # @return [CArray] `:boolean`.
908
+ # @raise [CArray::DataTypeError] for a complex array.
909
+ # @example
910
+ # CA_DOUBLE([-1.0, 0.0, -0.0]).signbit # => [ true, false, true ]
911
+ def signbit; end
912
+
913
+ # @overload &(other)
914
+ # Returns the element-wise conjunction of `self` and `other`: a
915
+ # bitwise `AND` on integer arrays, a logical `AND` on boolean ones.
916
+ #
917
+ # On boolean arrays the masked elements follow three-valued
918
+ # (Kleene) logic rather than propagating blindly: an unknown
919
+ # element `AND` `false` is `false`, because the answer does not
920
+ # depend on the unknown. Only where the result genuinely depends on
921
+ # a masked element is the result masked. {#and} is the two-valued
922
+ # form that always propagates.
923
+ # @param other [CArray, Integer, true, false] the other operand,
924
+ # broadcast to `self.shape`.
925
+ # @return [CArray] `:boolean` for boolean operands, otherwise the
926
+ # promoted integer `data_type`.
927
+ # @raise [CArray::DataTypeError] for a float or complex array.
928
+ def &(other); end
929
+
930
+ # @overload bit_and(other)
931
+ # Alias of {#&}.
932
+ # @param other [CArray, Integer, true, false] the other operand.
933
+ # @return [CArray]
934
+ def bit_and(other); end
935
+
936
+ # @overload |(other)
937
+ # Returns the element-wise disjunction of `self` and `other`: a
938
+ # bitwise `OR` on integer arrays, a logical `OR` on boolean ones.
939
+ # Boolean operands follow Kleene logic as in {#&}, so an unknown
940
+ # element `OR` `true` is `true`.
941
+ # @param other [CArray, Integer, true, false] the other operand,
942
+ # broadcast to `self.shape`.
943
+ # @return [CArray] `:boolean` for boolean operands, otherwise the
944
+ # promoted integer `data_type`.
945
+ # @raise [CArray::DataTypeError] for a float or complex array.
946
+ def |(other); end
947
+
948
+ # @overload bit_or(other)
949
+ # Alias of {#|}.
950
+ # @param other [CArray, Integer, true, false] the other operand.
951
+ # @return [CArray]
952
+ def bit_or(other); end
953
+
954
+ # @overload ^(other)
955
+ # Returns the element-wise exclusive disjunction of `self` and
956
+ # `other`: a bitwise `XOR` on integer arrays, a logical `XOR` on
957
+ # boolean ones.
958
+ #
959
+ # Unlike {#&} and {#|} this has no Kleene shortcut -- an exclusive
960
+ # or always depends on both operands -- so a masked element always
961
+ # gives a masked result.
962
+ # @param other [CArray, Integer, true, false] the other operand,
963
+ # broadcast to `self.shape`.
964
+ # @return [CArray] `:boolean` for boolean operands, otherwise the
965
+ # promoted integer `data_type`.
966
+ # @raise [CArray::DataTypeError] for a float or complex array.
967
+ def ^(other); end
968
+
969
+ # @overload bit_xor(other)
970
+ # Alias of {#^}.
971
+ # @param other [CArray, Integer, true, false] the other operand.
972
+ # @return [CArray]
973
+ def bit_xor(other); end
974
+
975
+ # @overload <<(other)
976
+ # Returns each element of `self` shifted left by the matching
977
+ # number of bits in `other`. Integer `data_type`s only (a boolean
978
+ # promotes to `:int64`).
979
+ # @param other [CArray, Integer] shift counts, broadcast to
980
+ # `self.shape`.
981
+ # @return [CArray] the promoted integer `data_type`.
982
+ # @raise [CArray::DataTypeError] for a float or complex array.
983
+ def <<(other); end
984
+
985
+ # @overload bit_lshift(other)
986
+ # Alias of {#<<}.
987
+ # @param other [CArray, Integer] shift counts.
988
+ # @return [CArray]
989
+ def bit_lshift(other); end
990
+
991
+ # @overload >>(other)
992
+ # Returns each element of `self` shifted right by the matching
993
+ # number of bits in `other`. Otherwise as {#<<}.
994
+ # @param other [CArray, Integer] shift counts.
995
+ # @return [CArray] the promoted integer `data_type`.
996
+ # @raise [CArray::DataTypeError] for a float or complex array.
997
+ def >>(other); end
998
+
999
+ # @overload bit_rshift(other)
1000
+ # Alias of {#>>}.
1001
+ # @param other [CArray, Integer] shift counts.
1002
+ # @return [CArray]
1003
+ def bit_rshift(other); end
1004
+
1005
+ # @overload bit_neg
1006
+ # Returns the element-wise complement: a bitwise `NOT` on integer
1007
+ # arrays, a logical negation on boolean ones. Aliased as `~`.
1008
+ # @return [CArray] same `data_type` as `self`.
1009
+ # @raise [CArray::DataTypeError] for a float or complex array.
1010
+ def bit_neg; end
1011
+
1012
+ # @overload not
1013
+ # Returns the element-wise logical negation of a boolean array.
1014
+ # Masked elements stay masked -- the negation of an unknown is
1015
+ # still unknown.
1016
+ # @return [CArray] `:boolean`.
1017
+ # @raise [CArray::DataTypeError] for any `data_type` other than
1018
+ # `:boolean` or `:object`.
1019
+ def not; end
1020
+
1021
+ # @overload and(other)
1022
+ # Returns the two-valued logical `AND` of two boolean arrays.
1023
+ #
1024
+ # Where {#&} applies Kleene logic, this form propagates the mask
1025
+ # unconditionally: if either element is masked the result is
1026
+ # masked, even when the unmasked element alone would settle the
1027
+ # answer. Use it when an unknown operand should make the result
1028
+ # unknown regardless.
1029
+ # @param other [CArray, true, false] the other operand, broadcast
1030
+ # to `self.shape`.
1031
+ # @return [CArray] `:boolean`.
1032
+ # @raise [CArray::DataTypeError] for any `data_type` other than
1033
+ # `:boolean` or `:object`.
1034
+ def and(other); end
1035
+
1036
+ # @overload or(other)
1037
+ # Returns the two-valued logical `OR` of two boolean arrays,
1038
+ # propagating the mask unconditionally as {#and} does.
1039
+ # @param other [CArray, true, false] the other operand.
1040
+ # @return [CArray] `:boolean`.
1041
+ # @raise [CArray::DataTypeError] for any `data_type` other than
1042
+ # `:boolean` or `:object`.
1043
+ def or(other); end
1044
+
1045
+ # @overload xor(other)
1046
+ # Returns the logical exclusive `OR` of two boolean arrays,
1047
+ # propagating the mask as {#and} does.
1048
+ # @param other [CArray, true, false] the other operand.
1049
+ # @return [CArray] `:boolean`.
1050
+ # @raise [CArray::DataTypeError] for any `data_type` other than
1051
+ # `:boolean` or `:object`.
1052
+ def xor(other); end
1053
+
1054
+ # @overload abs!
1055
+ # Applies {#abs} to `self` in place, keeping `self`'s
1056
+ # `data_type`.
1057
+ # @return [self]
1058
+ # @raise [CArray::DataTypeError] for a boolean array.
1059
+ def abs!; end
1060
+
1061
+ # @overload abs_i!
1062
+ # Applies {#abs_i} to `self` in place, keeping `self`'s
1063
+ # `data_type`.
1064
+ # @return [self]
1065
+ # @raise [CArray::DataTypeError] for a boolean array.
1066
+ def abs_i!; end
1067
+
1068
+ # @overload acos!
1069
+ # Applies {#acos} to `self` in place, keeping `self`'s
1070
+ # `data_type`.
1071
+ # @return [self]
1072
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1073
+ # whose `data_type` cannot hold the widened result -- {#acos} promotes
1074
+ # it instead of raising.
1075
+ def acos!; end
1076
+
1077
+ # @overload acosh!
1078
+ # Applies {#acosh} to `self` in place, keeping `self`'s
1079
+ # `data_type`.
1080
+ # @return [self]
1081
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1082
+ # whose `data_type` cannot hold the widened result -- {#acosh}
1083
+ # promotes it instead of raising.
1084
+ def acosh!; end
1085
+
1086
+ # @overload add!(other)
1087
+ # Applies {#add} to `self` in place, keeping `self`'s
1088
+ # `data_type`.
1089
+ # @param other [CArray, Numeric] the other operand, broadcast to
1090
+ # `self.shape`.
1091
+ # @return [self]
1092
+ # @raise [CArray::DataTypeError] for a boolean array.
1093
+ def add!(other); end
1094
+
1095
+ # @overload and!(other)
1096
+ # Applies {#and} to `self` in place, keeping `self`'s
1097
+ # `data_type`.
1098
+ # @param other [CArray, true, false] the other operand, broadcast
1099
+ # to `self.shape`.
1100
+ # @return [self]
1101
+ # @raise [CArray::DataTypeError] for an integer or float array.
1102
+ def and!(other); end
1103
+
1104
+ # @overload arg!
1105
+ # Applies {#arg} to `self` in place, keeping `self`'s
1106
+ # `data_type`.
1107
+ # @return [self]
1108
+ # @raise [CArray::DataTypeError] for an integer or boolean array, whose
1109
+ # `data_type` cannot hold the widened result -- {#arg} promotes it
1110
+ # instead of raising.
1111
+ def arg!; end
1112
+
1113
+ # @overload asin!
1114
+ # Applies {#asin} to `self` in place, keeping `self`'s
1115
+ # `data_type`.
1116
+ # @return [self]
1117
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1118
+ # whose `data_type` cannot hold the widened result -- {#asin} promotes
1119
+ # it instead of raising.
1120
+ def asin!; end
1121
+
1122
+ # @overload asinh!
1123
+ # Applies {#asinh} to `self` in place, keeping `self`'s
1124
+ # `data_type`.
1125
+ # @return [self]
1126
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1127
+ # whose `data_type` cannot hold the widened result -- {#asinh}
1128
+ # promotes it instead of raising.
1129
+ def asinh!; end
1130
+
1131
+ # @overload atan!
1132
+ # Applies {#atan} to `self` in place, keeping `self`'s
1133
+ # `data_type`.
1134
+ # @return [self]
1135
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1136
+ # whose `data_type` cannot hold the widened result -- {#atan} promotes
1137
+ # it instead of raising.
1138
+ def atan!; end
1139
+
1140
+ # @overload atan2!(other)
1141
+ # Applies {#atan2} to `self` in place, keeping `self`'s
1142
+ # `data_type`.
1143
+ # @param other [CArray, Numeric] the other operand, broadcast to
1144
+ # `self.shape`.
1145
+ # @return [self]
1146
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1147
+ # whose `data_type` cannot hold the widened result -- {#atan2}
1148
+ # promotes it instead of raising.
1149
+ def atan2!(other); end
1150
+
1151
+ # @overload atanh!
1152
+ # Applies {#atanh} to `self` in place, keeping `self`'s
1153
+ # `data_type`.
1154
+ # @return [self]
1155
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1156
+ # whose `data_type` cannot hold the widened result -- {#atanh}
1157
+ # promotes it instead of raising.
1158
+ def atanh!; end
1159
+
1160
+ # @overload bit_lshift!(other)
1161
+ # Applies {#bit_lshift} to `self` in place, keeping `self`'s
1162
+ # `data_type`.
1163
+ # @param other [CArray, Numeric] the other operand, broadcast to
1164
+ # `self.shape`.
1165
+ # @return [self]
1166
+ # @raise [CArray::DataTypeError] for a float or boolean array.
1167
+ def bit_lshift!(other); end
1168
+
1169
+ # @overload bit_neg!
1170
+ # Applies {#bit_neg} to `self` in place, keeping `self`'s
1171
+ # `data_type`.
1172
+ # @return [self]
1173
+ # @raise [CArray::DataTypeError] for a float array.
1174
+ def bit_neg!; end
1175
+
1176
+ # @overload bit_rshift!(other)
1177
+ # Applies {#bit_rshift} to `self` in place, keeping `self`'s
1178
+ # `data_type`.
1179
+ # @param other [CArray, Numeric] the other operand, broadcast to
1180
+ # `self.shape`.
1181
+ # @return [self]
1182
+ # @raise [CArray::DataTypeError] for a float or boolean array.
1183
+ def bit_rshift!(other); end
1184
+
1185
+ # @overload ceil!
1186
+ # Applies {#ceil} to `self` in place, keeping `self`'s
1187
+ # `data_type`.
1188
+ # @return [self]
1189
+ # @raise [CArray::DataTypeError] for a boolean array.
1190
+ def ceil!; end
1191
+
1192
+ # @overload conj!
1193
+ # Applies {#conj} to `self` in place, keeping `self`'s
1194
+ # `data_type`.
1195
+ # @return [self]
1196
+ # @raise [CArray::DataTypeError] for a boolean array.
1197
+ def conj!; end
1198
+
1199
+ # @overload copysign!(other)
1200
+ # Applies {#copysign} to `self` in place, keeping `self`'s
1201
+ # `data_type`.
1202
+ # @param other [CArray, Numeric] the other operand, broadcast to
1203
+ # `self.shape`.
1204
+ # @return [self]
1205
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1206
+ # whose `data_type` cannot hold the widened result -- {#copysign}
1207
+ # promotes it instead of raising.
1208
+ def copysign!(other); end
1209
+
1210
+ # @overload cos!
1211
+ # Applies {#cos} to `self` in place, keeping `self`'s
1212
+ # `data_type`.
1213
+ # @return [self]
1214
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1215
+ # whose `data_type` cannot hold the widened result -- {#cos} promotes
1216
+ # it instead of raising.
1217
+ def cos!; end
1218
+
1219
+ # @overload cosh!
1220
+ # Applies {#cosh} to `self` in place, keeping `self`'s
1221
+ # `data_type`.
1222
+ # @return [self]
1223
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1224
+ # whose `data_type` cannot hold the widened result -- {#cosh} promotes
1225
+ # it instead of raising.
1226
+ def cosh!; end
1227
+
1228
+ # @overload deg!
1229
+ # Applies {#deg} to `self` in place, keeping `self`'s
1230
+ # `data_type`.
1231
+ # @return [self]
1232
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1233
+ # whose `data_type` cannot hold the widened result -- {#deg} promotes
1234
+ # it instead of raising.
1235
+ def deg!; end
1236
+
1237
+ # @overload deg_180!
1238
+ # Applies {#deg_180} to `self` in place, keeping `self`'s
1239
+ # `data_type`.
1240
+ # @return [self]
1241
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1242
+ # whose `data_type` cannot hold the widened result -- {#deg_180}
1243
+ # promotes it instead of raising.
1244
+ def deg_180!; end
1245
+
1246
+ # @overload deg_360!
1247
+ # Applies {#deg_360} to `self` in place, keeping `self`'s
1248
+ # `data_type`.
1249
+ # @return [self]
1250
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1251
+ # whose `data_type` cannot hold the widened result -- {#deg_360}
1252
+ # promotes it instead of raising.
1253
+ def deg_360!; end
1254
+
1255
+ # @overload exp!
1256
+ # Applies {#exp} to `self` in place, keeping `self`'s
1257
+ # `data_type`.
1258
+ # @return [self]
1259
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1260
+ # whose `data_type` cannot hold the widened result -- {#exp} promotes
1261
+ # it instead of raising.
1262
+ def exp!; end
1263
+
1264
+ # @overload exp10!
1265
+ # Applies {#exp10} to `self` in place, keeping `self`'s
1266
+ # `data_type`.
1267
+ # @return [self]
1268
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1269
+ # whose `data_type` cannot hold the widened result -- {#exp10}
1270
+ # promotes it instead of raising.
1271
+ def exp10!; end
1272
+
1273
+ # @overload exp2!
1274
+ # Applies {#exp2} to `self` in place, keeping `self`'s
1275
+ # `data_type`.
1276
+ # @return [self]
1277
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1278
+ # whose `data_type` cannot hold the widened result -- {#exp2} promotes
1279
+ # it instead of raising.
1280
+ def exp2!; end
1281
+
1282
+ # @overload expm1!
1283
+ # Applies {#expm1} to `self` in place, keeping `self`'s
1284
+ # `data_type`.
1285
+ # @return [self]
1286
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1287
+ # whose `data_type` cannot hold the widened result -- {#expm1}
1288
+ # promotes it instead of raising.
1289
+ def expm1!; end
1290
+
1291
+ # @overload floor!
1292
+ # Applies {#floor} to `self` in place, keeping `self`'s
1293
+ # `data_type`.
1294
+ # @return [self]
1295
+ # @raise [CArray::DataTypeError] for a boolean array.
1296
+ def floor!; end
1297
+
1298
+ # @overload fma!(a, b)
1299
+ # Applies {#fma} to `self` in place, keeping `self`'s
1300
+ # `data_type`.
1301
+ # @param a [CArray, Numeric] first operand, broadcast to `self.shape`.
1302
+ # @param b [CArray, Numeric] second operand, broadcast to `self.shape`.
1303
+ # @return [self]
1304
+ # @raise [CArray::DataTypeError] for a boolean array.
1305
+ def fma!(a, b); end
1306
+
1307
+ # @overload fms!(a, b)
1308
+ # Applies {#fms} to `self` in place, keeping `self`'s
1309
+ # `data_type`.
1310
+ # @param a [CArray, Numeric] first operand, broadcast to `self.shape`.
1311
+ # @param b [CArray, Numeric] second operand, broadcast to `self.shape`.
1312
+ # @return [self]
1313
+ # @raise [CArray::DataTypeError] for a boolean array.
1314
+ def fms!(a, b); end
1315
+
1316
+ # @overload hypot!(other)
1317
+ # Applies {#hypot} to `self` in place, keeping `self`'s
1318
+ # `data_type`.
1319
+ # @param other [CArray, Numeric] the other operand, broadcast to
1320
+ # `self.shape`.
1321
+ # @return [self]
1322
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1323
+ # whose `data_type` cannot hold the widened result -- {#hypot}
1324
+ # promotes it instead of raising.
1325
+ def hypot!(other); end
1326
+
1327
+ # @overload imag_i!
1328
+ # Applies {#imag_i} to `self` in place, keeping `self`'s
1329
+ # `data_type`.
1330
+ # @return [self]
1331
+ # @raise [CArray::DataTypeError] for a boolean array.
1332
+ def imag_i!; end
1333
+
1334
+ # @overload log!
1335
+ # Applies {#log} to `self` in place, keeping `self`'s
1336
+ # `data_type`.
1337
+ # @return [self]
1338
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1339
+ # whose `data_type` cannot hold the widened result -- {#log} promotes
1340
+ # it instead of raising.
1341
+ def log!; end
1342
+
1343
+ # @overload log10!
1344
+ # Applies {#log10} to `self` in place, keeping `self`'s
1345
+ # `data_type`.
1346
+ # @return [self]
1347
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1348
+ # whose `data_type` cannot hold the widened result -- {#log10}
1349
+ # promotes it instead of raising.
1350
+ def log10!; end
1351
+
1352
+ # @overload log1p!
1353
+ # Applies {#log1p} to `self` in place, keeping `self`'s
1354
+ # `data_type`.
1355
+ # @return [self]
1356
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1357
+ # whose `data_type` cannot hold the widened result -- {#log1p}
1358
+ # promotes it instead of raising.
1359
+ def log1p!; end
1360
+
1361
+ # @overload log2!
1362
+ # Applies {#log2} to `self` in place, keeping `self`'s
1363
+ # `data_type`.
1364
+ # @return [self]
1365
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1366
+ # whose `data_type` cannot hold the widened result -- {#log2} promotes
1367
+ # it instead of raising.
1368
+ def log2!; end
1369
+
1370
+ # @overload logaddexp!(other)
1371
+ # Applies {#logaddexp} to `self` in place, keeping `self`'s
1372
+ # `data_type`.
1373
+ # @param other [CArray, Numeric] the other operand, broadcast to
1374
+ # `self.shape`.
1375
+ # @return [self]
1376
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1377
+ # whose `data_type` cannot hold the widened result -- {#logaddexp}
1378
+ # promotes it instead of raising.
1379
+ def logaddexp!(other); end
1380
+
1381
+ # @overload logb!
1382
+ # Applies {#logb} to `self` in place, keeping `self`'s
1383
+ # `data_type`.
1384
+ # @return [self]
1385
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1386
+ # whose `data_type` cannot hold the widened result -- {#logb} promotes
1387
+ # it instead of raising.
1388
+ def logb!; end
1389
+
1390
+ # @overload maximum!(other)
1391
+ # Applies {#maximum} to `self` in place, keeping `self`'s
1392
+ # `data_type`.
1393
+ # @param other [CArray, Numeric] the other operand, broadcast to
1394
+ # `self.shape`.
1395
+ # @return [self]
1396
+ # @raise [CArray::DataTypeError] for a boolean array.
1397
+ def maximum!(other); end
1398
+
1399
+ # @overload minimum!(other)
1400
+ # Applies {#minimum} to `self` in place, keeping `self`'s
1401
+ # `data_type`.
1402
+ # @param other [CArray, Numeric] the other operand, broadcast to
1403
+ # `self.shape`.
1404
+ # @return [self]
1405
+ # @raise [CArray::DataTypeError] for a boolean array.
1406
+ def minimum!(other); end
1407
+
1408
+ # @overload mul!(other)
1409
+ # Applies {#mul} to `self` in place, keeping `self`'s
1410
+ # `data_type`.
1411
+ # @param other [CArray, Numeric] the other operand, broadcast to
1412
+ # `self.shape`.
1413
+ # @return [self]
1414
+ # @raise [CArray::DataTypeError] for a boolean array.
1415
+ def mul!(other); end
1416
+
1417
+ # @overload neg!
1418
+ # Applies {#neg} to `self` in place, keeping `self`'s
1419
+ # `data_type`.
1420
+ # @return [self]
1421
+ # @raise [CArray::DataTypeError] for a boolean array.
1422
+ def neg!; end
1423
+
1424
+ # @overload nextafter!(other)
1425
+ # Applies {#nextafter} to `self` in place, keeping `self`'s
1426
+ # `data_type`.
1427
+ # @param other [CArray, Numeric] the other operand, broadcast to
1428
+ # `self.shape`.
1429
+ # @return [self]
1430
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1431
+ # whose `data_type` cannot hold the widened result -- {#nextafter}
1432
+ # promotes it instead of raising.
1433
+ def nextafter!(other); end
1434
+
1435
+ # @overload not!
1436
+ # Applies {#not} to `self` in place, keeping `self`'s
1437
+ # `data_type`.
1438
+ # @return [self]
1439
+ # @raise [CArray::DataTypeError] for an integer or float array.
1440
+ def not!; end
1441
+
1442
+ # @overload one!
1443
+ # Applies {#one} to `self` in place, keeping `self`'s
1444
+ # `data_type`.
1445
+ # @return [self]
1446
+ def one!; end
1447
+
1448
+ # @overload or!(other)
1449
+ # Applies {#or} to `self` in place, keeping `self`'s
1450
+ # `data_type`.
1451
+ # @param other [CArray, true, false] the other operand, broadcast
1452
+ # to `self.shape`.
1453
+ # @return [self]
1454
+ # @raise [CArray::DataTypeError] for an integer or float array.
1455
+ def or!(other); end
1456
+
1457
+ # @overload pmax!(other)
1458
+ # Applies {#pmax} to `self` in place, keeping `self`'s
1459
+ # `data_type`.
1460
+ # @param other [CArray, Numeric] the other operand, broadcast to
1461
+ # `self.shape`.
1462
+ # @return [self]
1463
+ # @raise [CArray::DataTypeError] for a boolean array.
1464
+ def pmax!(other); end
1465
+
1466
+ # @overload pmin!(other)
1467
+ # Applies {#pmin} to `self` in place, keeping `self`'s
1468
+ # `data_type`.
1469
+ # @param other [CArray, Numeric] the other operand, broadcast to
1470
+ # `self.shape`.
1471
+ # @return [self]
1472
+ # @raise [CArray::DataTypeError] for a boolean array.
1473
+ def pmin!(other); end
1474
+
1475
+ # @overload power!(other)
1476
+ # Applies {#power} to `self` in place, keeping `self`'s
1477
+ # `data_type`.
1478
+ # @param other [CArray, Numeric] the other operand, broadcast to
1479
+ # `self.shape`.
1480
+ # @return [self]
1481
+ # @raise [CArray::DataTypeError] for a boolean array.
1482
+ def power!(other); end
1483
+
1484
+ # @overload rad!
1485
+ # Applies {#rad} to `self` in place, keeping `self`'s
1486
+ # `data_type`.
1487
+ # @return [self]
1488
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1489
+ # whose `data_type` cannot hold the widened result -- {#rad} promotes
1490
+ # it instead of raising.
1491
+ def rad!; end
1492
+
1493
+ # @overload rad_2pi!
1494
+ # Applies {#rad_2pi} to `self` in place, keeping `self`'s
1495
+ # `data_type`.
1496
+ # @return [self]
1497
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1498
+ # whose `data_type` cannot hold the widened result -- {#rad_2pi}
1499
+ # promotes it instead of raising.
1500
+ def rad_2pi!; end
1501
+
1502
+ # @overload rad_pi!
1503
+ # Applies {#rad_pi} to `self` in place, keeping `self`'s
1504
+ # `data_type`.
1505
+ # @return [self]
1506
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1507
+ # whose `data_type` cannot hold the widened result -- {#rad_pi}
1508
+ # promotes it instead of raising.
1509
+ def rad_pi!; end
1510
+
1511
+ # @overload rcp!
1512
+ # Applies {#rcp} to `self` in place, keeping `self`'s
1513
+ # `data_type`.
1514
+ # @return [self]
1515
+ # @raise [CArray::DataTypeError] for a boolean array.
1516
+ def rcp!; end
1517
+
1518
+ # @overload rcp_mul!(other)
1519
+ # Applies {#rcp_mul} to `self` in place, keeping `self`'s
1520
+ # `data_type`.
1521
+ # @param other [CArray, Numeric] the other operand, broadcast to
1522
+ # `self.shape`.
1523
+ # @return [self]
1524
+ # @raise [CArray::DataTypeError] for a boolean array.
1525
+ def rcp_mul!(other); end
1526
+
1527
+ # @overload rsqrt!
1528
+ # Applies {#rsqrt} to `self` in place, keeping `self`'s
1529
+ # `data_type`.
1530
+ # @return [self]
1531
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1532
+ # whose `data_type` cannot hold the widened result -- {#rsqrt}
1533
+ # promotes it instead of raising.
1534
+ def rsqrt!; end
1535
+
1536
+ # @overload sign!
1537
+ # Applies {#sign} to `self` in place, keeping `self`'s
1538
+ # `data_type`.
1539
+ # @return [self]
1540
+ def sign!; end
1541
+
1542
+ # @overload sin!
1543
+ # Applies {#sin} to `self` in place, keeping `self`'s
1544
+ # `data_type`.
1545
+ # @return [self]
1546
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1547
+ # whose `data_type` cannot hold the widened result -- {#sin} promotes
1548
+ # it instead of raising.
1549
+ def sin!; end
1550
+
1551
+ # @overload sinh!
1552
+ # Applies {#sinh} to `self` in place, keeping `self`'s
1553
+ # `data_type`.
1554
+ # @return [self]
1555
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1556
+ # whose `data_type` cannot hold the widened result -- {#sinh} promotes
1557
+ # it instead of raising.
1558
+ def sinh!; end
1559
+
1560
+ # @overload sqrt!
1561
+ # Applies {#sqrt} to `self` in place, keeping `self`'s
1562
+ # `data_type`.
1563
+ # @return [self]
1564
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1565
+ # whose `data_type` cannot hold the widened result -- {#sqrt} promotes
1566
+ # it instead of raising.
1567
+ def sqrt!; end
1568
+
1569
+ # @overload square!
1570
+ # Applies {#square} to `self` in place, keeping `self`'s
1571
+ # `data_type`.
1572
+ # @return [self]
1573
+ # @raise [CArray::DataTypeError] for a boolean array.
1574
+ def square!; end
1575
+
1576
+ # @overload sub!(other)
1577
+ # Applies {#sub} to `self` in place, keeping `self`'s
1578
+ # `data_type`.
1579
+ # @param other [CArray, Numeric] the other operand, broadcast to
1580
+ # `self.shape`.
1581
+ # @return [self]
1582
+ # @raise [CArray::DataTypeError] for a boolean array.
1583
+ def sub!(other); end
1584
+
1585
+ # @overload tan!
1586
+ # Applies {#tan} to `self` in place, keeping `self`'s
1587
+ # `data_type`.
1588
+ # @return [self]
1589
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1590
+ # whose `data_type` cannot hold the widened result -- {#tan} promotes
1591
+ # it instead of raising.
1592
+ def tan!; end
1593
+
1594
+ # @overload tanh!
1595
+ # Applies {#tanh} to `self` in place, keeping `self`'s
1596
+ # `data_type`.
1597
+ # @return [self]
1598
+ # @raise [CArray::DataTypeError] for an integer or boolean array,
1599
+ # whose `data_type` cannot hold the widened result -- {#tanh} promotes
1600
+ # it instead of raising.
1601
+ def tanh!; end
1602
+
1603
+ # @overload trunc!
1604
+ # Applies {#trunc} to `self` in place, keeping `self`'s
1605
+ # `data_type`.
1606
+ # @return [self]
1607
+ # @raise [CArray::DataTypeError] for a boolean array.
1608
+ def trunc!; end
1609
+
1610
+ # @overload xor!(other)
1611
+ # Applies {#xor} to `self` in place, keeping `self`'s
1612
+ # `data_type`.
1613
+ # @param other [CArray, true, false] the other operand, broadcast
1614
+ # to `self.shape`.
1615
+ # @return [self]
1616
+ # @raise [CArray::DataTypeError] for an integer or float array.
1617
+ def xor!(other); end
1618
+
1619
+ # @overload zero!
1620
+ # Applies {#zero} to `self` in place, keeping `self`'s
1621
+ # `data_type`.
1622
+ # @return [self]
1623
+ def zero!; end
1624
+
1625
+
131
1626
  # @!endgroup
132
1627
  end