carray 3.0.6 → 3.1.0
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.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/CHANGELOG.md +7 -1830
- data/README.md +62 -35
- data/carray.gemspec +16 -4
- data/docs/changelogs/CHANGELOG-3.0.md +2464 -0
- data/ext/ca_array_pool.c +4 -5
- data/ext/ca_axis_descriptor.h +45 -30
- data/ext/ca_axis_dispatch.c +7 -4
- data/ext/ca_axis_group.c +12 -15
- data/ext/ca_bincmp_dispatch.h +16 -38
- data/ext/ca_binop_dispatch.c +35 -0
- data/ext/ca_binop_dispatch.h +22 -46
- data/ext/ca_categorical_iterator.c +36 -34
- data/ext/ca_compare.c +0 -1
- data/ext/ca_compare.h +8 -1
- data/ext/ca_composite_dispatch.h +6 -0
- data/ext/ca_for_buffer.h +6 -1
- data/ext/ca_group_iter.c +17 -18
- data/ext/ca_iter_state_fields.h +196 -0
- data/ext/ca_iter_substrate.h +84 -103
- data/ext/ca_kernel_iterator.c +125 -89
- data/ext/ca_kernel_iterator.h +229 -1504
- data/ext/ca_kernel_iterator_internal.h +1167 -0
- data/ext/ca_moncmp_dispatch.h +17 -24
- data/ext/ca_monop_dispatch.h +25 -74
- data/ext/ca_obj_array.c +92 -165
- data/ext/ca_obj_bincmp.c +65 -48
- data/ext/ca_obj_binop.c +74 -49
- data/ext/ca_obj_bitarray.c +7 -21
- data/ext/ca_obj_bitfield.c +93 -26
- data/ext/ca_obj_block.c +11 -12
- data/ext/ca_obj_byte_swap.c +34 -34
- data/ext/ca_obj_const_string.c +464 -304
- data/ext/ca_obj_face.c +167 -121
- data/ext/ca_obj_face.h +32 -170
- data/ext/ca_obj_fake.c +127 -34
- data/ext/ca_obj_farray.c +13 -9
- data/ext/ca_obj_field.c +17 -13
- data/ext/ca_obj_fixlen_string.c +57 -34
- data/ext/ca_obj_grid.c +149 -113
- data/ext/ca_obj_meld.c +28 -26
- data/ext/ca_obj_moncmp.c +10 -21
- data/ext/ca_obj_monop.c +88 -73
- data/ext/ca_obj_object.c +60 -46
- data/ext/ca_obj_record.c +74 -22
- data/ext/ca_obj_reduce.c +10 -14
- data/ext/ca_obj_refer.c +146 -39
- data/ext/ca_obj_remap.c +11 -29
- data/ext/ca_obj_repeat.c +41 -23
- data/ext/ca_obj_roll.c +20 -28
- data/ext/ca_obj_select.c +17 -27
- data/ext/ca_obj_select_axis.c +35 -42
- data/ext/ca_obj_shift.c +22 -42
- data/ext/ca_obj_source.c +1 -5
- data/ext/ca_obj_stack.c +33 -29
- data/ext/ca_obj_stride.c +99 -62
- data/ext/ca_obj_string.c +8 -20
- data/ext/ca_obj_tile.c +14 -16
- data/ext/ca_obj_time.c +12 -23
- data/ext/ca_obj_timedelta.c +12 -23
- data/ext/ca_obj_transpose.c +8 -10
- data/ext/ca_obj_triop.c +48 -49
- data/ext/ca_obj_window.c +87 -99
- data/ext/ca_op_cmplx64.h +4 -0
- data/ext/ca_op_ipower.c +97 -27
- data/ext/ca_op_powi.h +9 -28
- data/ext/ca_pow5_table.h +2 -1
- data/ext/ca_rng_normal.h +4 -0
- data/ext/ca_rng_xoshiro256pp.h +3 -0
- data/ext/ca_sort_kernels.h +23 -26
- data/ext/ca_sweep_engine.c +92 -26
- data/ext/ca_sweep_engine.h +22 -15
- data/ext/ca_transform_common.c +3 -8
- data/ext/ca_triop_dispatch.h +20 -32
- data/ext/caframe_csv_reader.c +12 -12
- data/ext/carray.h +300 -1009
- data/ext/carray_access.c +320 -207
- data/ext/carray_address_basis.c +128 -59
- data/ext/carray_attribute.c +81 -104
- data/ext/carray_bincount.c +12 -14
- data/ext/carray_broadcast.c +31 -27
- data/ext/carray_call_cfunc.c +174 -285
- data/ext/carray_call_cfunc.h +36 -28
- data/ext/carray_cast.c +1191 -351
- data/ext/carray_cast_func.rb +68 -8
- data/ext/carray_class.c +6 -11
- data/ext/carray_conversion.c +98 -39
- data/ext/carray_copy.c +52 -26
- data/ext/carray_core.c +286 -132
- data/ext/carray_count.c +53 -22
- data/ext/carray_element.c +49 -28
- data/ext/carray_factorize.c +64 -63
- data/ext/carray_generate.c +26 -19
- data/ext/carray_histogram.c +9 -11
- data/ext/carray_hold.c +7 -9
- data/ext/carray_index_classifier.c +127 -230
- data/ext/carray_index_classifier.h +11 -10
- data/ext/carray_integer_total.c +523 -0
- data/ext/carray_internal.h +1364 -156
- data/ext/carray_key_windows.c +3 -3
- data/ext/carray_lazy.c +37 -37
- data/ext/carray_loop.c +27 -23
- data/ext/carray_mask.c +235 -150
- data/ext/carray_math_kernel.h +23 -47
- data/ext/carray_mathfunc.c +10 -3
- data/ext/carray_median_percentile.c +106 -100
- data/ext/carray_memory_view.c +83 -69
- data/ext/carray_operator.c +490 -128
- data/ext/carray_order.c +163 -84
- data/ext/carray_partition.c +14 -16
- data/ext/carray_random.c +48 -42
- data/ext/carray_round.c +33 -5
- data/ext/carray_scatter.c +57 -39
- data/ext/carray_segment.c +42 -46
- data/ext/carray_slab.c +77 -51
- data/ext/carray_slab.h +44 -33
- data/ext/carray_sort.c +37 -31
- data/ext/carray_sort_kernel.c +36 -10
- data/ext/carray_struct.c +44 -34
- data/ext/carray_test.c +131 -81
- data/ext/carray_time_text.c +30 -31
- data/ext/carray_undef.c +50 -7
- data/ext/carray_utils.c +373 -139
- data/ext/extconf.rb +24 -17
- data/ext/mk_call_cfunc.rb +25 -31
- data/ext/mk_pow5_table.rb +2 -1
- data/ext/mkkernel.rb +819 -488
- data/ext/ruby_carray.c +47 -42
- data/ext/version.h +7 -5
- data/lib/carray/attribute.rb +19 -18
- data/lib/carray/autoload_carray.rb +20 -15
- data/lib/carray/autoload_method_extension.rb +64 -57
- data/lib/carray/axis_group.rb +272 -185
- data/lib/carray/basics.rb +298 -56
- data/lib/carray/bincount_nd.rb +41 -18
- data/lib/carray/block_iterator.rb +167 -119
- data/lib/carray/boolean_reduce.rb +7 -4
- data/lib/carray/categorical.rb +84 -59
- data/lib/carray/categorical_iterator.rb +90 -67
- data/lib/carray/complex.rb +61 -41
- data/lib/carray/conditional.rb +98 -23
- data/lib/carray/const_string.rb +112 -46
- data/lib/carray/core_extensions.rb +20 -69
- data/lib/carray/distance_limit.rb +7 -5
- data/lib/carray/factories.rb +269 -0
- data/lib/carray/fixlen_string.rb +95 -12
- data/lib/carray/frame/column_verbs.rb +76 -9
- data/lib/carray/frame/concat.rb +51 -7
- data/lib/carray/frame/convert.rb +2 -1
- data/lib/carray/frame/csv_parser.rb +20 -5
- data/lib/carray/frame/frame.rb +73 -31
- data/lib/carray/frame/group.rb +247 -187
- data/lib/carray/frame/io.rb +36 -12
- data/lib/carray/frame/join.rb +56 -17
- data/lib/carray/frame/records.rb +7 -5
- data/lib/carray/frame/reshape.rb +27 -7
- data/lib/carray/frame/sort.rb +10 -8
- data/lib/carray/frame/verbs.rb +217 -134
- data/lib/carray/frame/windows.rb +254 -19
- data/lib/carray/frame.rb +1 -2
- data/lib/carray/fuse_source.rb +28 -23
- data/lib/carray/fusion.rb +30 -30
- data/lib/carray/histogram.rb +35 -16
- data/lib/carray/inspect.rb +7 -7
- data/lib/carray/iterator.rb +104 -23
- data/lib/carray/key_windows.rb +93 -61
- data/lib/carray/lazy.rb +208 -111
- data/lib/carray/limits.rb +80 -0
- data/lib/carray/mask_gap_fill.rb +21 -16
- data/lib/carray/math.rb +87 -50
- data/lib/carray/meld_reduce.rb +30 -8
- data/lib/carray/methods/align_addr.rb +29 -17
- data/lib/carray/methods/bin.rb +8 -1
- data/lib/carray/methods/bincount.rb +4 -2
- data/lib/carray/methods/bit_string.rb +19 -31
- data/lib/carray/methods/broadcast.rb +8 -3
- data/lib/carray/methods/choose.rb +5 -5
- data/lib/carray/methods/composition.rb +73 -72
- data/lib/carray/methods/{index.rb → coordinate.rb} +13 -13
- data/lib/carray/methods/discovery_along.rb +3 -3
- data/lib/carray/methods/factorize.rb +2 -0
- data/lib/carray/methods/gather_nd.rb +106 -103
- data/lib/carray/methods/insert_block.rb +2 -2
- data/lib/carray/methods/is_between.rb +6 -4
- data/lib/carray/methods/is_in.rb +183 -143
- data/lib/carray/methods/join.rb +2 -1
- data/lib/carray/methods/lag.rb +6 -2
- data/lib/carray/methods/locate_addr.rb +157 -94
- data/lib/carray/methods/mask_duplicates.rb +1 -1
- data/lib/carray/methods/meshgrid.rb +28 -16
- data/lib/carray/methods/mode.rb +67 -67
- data/lib/carray/methods/nunique.rb +9 -7
- data/lib/carray/methods/repeat.rb +23 -13
- data/lib/carray/methods/resize.rb +1 -1
- data/lib/carray/methods/snap.rb +24 -20
- data/lib/carray/methods/string_format.rb +2 -2
- data/lib/carray/methods/unique.rb +4 -2
- data/lib/carray/methods/value_counts.rb +1 -1
- data/lib/carray/mkmf.rb +25 -28
- data/lib/carray/percentile_arguments.rb +82 -0
- data/lib/carray/record_order.rb +50 -20
- data/lib/carray/rng.rb +1 -0
- data/lib/carray/runtime.rb +195 -17
- data/lib/carray/segment_iterator.rb +262 -137
- data/lib/carray/serialize.rb +635 -566
- data/lib/carray/slab_iterator.rb +114 -114
- data/lib/carray/stack.rb +14 -15
- data/lib/carray/string.rb +16 -22
- data/lib/carray/string_operation_extension.rb +97 -52
- data/lib/carray/struct.rb +122 -164
- data/lib/carray/struct_builder.rb +247 -73
- data/lib/carray/time.rb +663 -365
- data/lib/carray/window_iterator.rb +232 -155
- data/lib/carray.rb +6 -11
- data/yard-stubs/ca_obj_array.rb +20 -135
- data/yard-stubs/ca_obj_bitarray.rb +1 -8
- data/yard-stubs/ca_obj_bitfield.rb +6 -2
- data/yard-stubs/ca_obj_byte_swap.rb +21 -7
- data/yard-stubs/ca_obj_fake.rb +3 -1
- data/yard-stubs/ca_obj_farray.rb +1 -1
- data/yard-stubs/ca_obj_field.rb +8 -6
- data/yard-stubs/ca_obj_refer.rb +10 -5
- data/yard-stubs/ca_obj_roll.rb +7 -6
- data/yard-stubs/ca_obj_shift.rb +2 -3
- data/yard-stubs/ca_obj_stride.rb +5 -7
- data/yard-stubs/ca_obj_tile.rb +1 -1
- data/yard-stubs/ca_obj_time.rb +43 -0
- data/yard-stubs/ca_obj_transpose.rb +1 -1
- data/yard-stubs/ca_obj_window.rb +28 -16
- data/yard-stubs/carray_access.rb +55 -6
- data/yard-stubs/carray_attribute.rb +26 -38
- data/yard-stubs/carray_cast.rb +121 -162
- data/yard-stubs/carray_class.rb +3 -4
- data/yard-stubs/carray_conversion.rb +6 -7
- data/yard-stubs/carray_copy.rb +2 -1
- data/yard-stubs/carray_count.rb +10 -5
- data/yard-stubs/carray_element.rb +4 -3
- data/yard-stubs/carray_limits.rb +100 -0
- data/yard-stubs/carray_loop.rb +0 -20
- data/yard-stubs/carray_mask.rb +59 -41
- data/yard-stubs/carray_math.rb +162 -100
- data/yard-stubs/carray_mathfunc.rb +415 -3
- data/yard-stubs/carray_median_percentile.rb +29 -11
- data/yard-stubs/carray_memory_view.rb +2 -2
- data/yard-stubs/carray_order.rb +72 -33
- data/yard-stubs/carray_random.rb +6 -6
- data/yard-stubs/carray_reduce.rb +353 -0
- data/yard-stubs/carray_rng.rb +92 -0
- data/yard-stubs/carray_scatter.rb +12 -3
- data/yard-stubs/carray_slab.rb +7 -4
- data/yard-stubs/carray_sort.rb +7 -6
- data/yard-stubs/carray_test.rb +18 -5
- data/yard-stubs/carray_undef.rb +44 -5
- data/yard-stubs/ruby_carray.rb +75 -40
- metadata +63 -25
- data/CHANGELOG.v1.md +0 -126
- data/ext/carray_build_flags.h +0 -3
- data/ext/carray_config.h +0 -28
- data/ext/carray_data_type.c +0 -90
- data/ext/carray_kernels_bincmp.c +0 -6457
- data/ext/carray_kernels_binop.c +0 -31534
- data/ext/carray_kernels_init.c +0 -1734
- data/ext/carray_kernels_moncmp.c +0 -2104
- data/ext/carray_kernels_monop.c +0 -25387
- data/ext/carray_kernels_reduce_aggregate.c +0 -27545
- data/ext/carray_kernels_reduce_boolean.c +0 -1924
- data/ext/carray_kernels_reduce_cumulative.c +0 -11646
- data/ext/carray_kernels_reduce_extreme.c +0 -21631
- data/ext/carray_kernels_reduce_variance.c +0 -5981
- data/ext/carray_kernels_scan.c +0 -4302
- data/ext/carray_kernels_search.c +0 -37776
- data/ext/carray_kernels_sort.c +0 -10814
- data/ext/carray_kernels_triop.c +0 -1864
- data/lib/carray/construct.rb +0 -360
- data/lib/carray/data_type_extension.rb +0 -261
- data/lib/carray/data_type_limits.rb +0 -91
data/yard-stubs/carray_math.rb
CHANGED
|
@@ -37,11 +37,12 @@ class CArray
|
|
|
37
37
|
# operands.
|
|
38
38
|
# @raise [ZeroDivisionError] when an integer divisor is `0`. Float
|
|
39
39
|
# division returns `Infinity` or `NaN` instead.
|
|
40
|
-
# @raise [RangeError] when an Integer `other`
|
|
41
|
-
# integer `data_type` of `self
|
|
40
|
+
# @raise [RangeError] when an Integer (or integer CScalar) `other`
|
|
41
|
+
# does not fit the integer `data_type` of `self`: cut to the type, it
|
|
42
|
+
# would give another quotient.
|
|
42
43
|
# @example
|
|
43
44
|
# CA_INT32([-7, -1, 7]) / 3 # => [ -3, -1, 2 ]
|
|
44
|
-
#
|
|
45
|
+
# CA_FLOAT64([-7.0]) / 3.0 # => [ -2.3333333333333335 ]
|
|
45
46
|
def /(other); end
|
|
46
47
|
|
|
47
48
|
# @overload div(other)
|
|
@@ -75,7 +76,7 @@ class CArray
|
|
|
75
76
|
# @example
|
|
76
77
|
# CA_INT32([-7, -1, 7]) % 3 # => [ 2, 2, 1 ]
|
|
77
78
|
# CA_INT32([7]) % -3 # => [ -2 ]
|
|
78
|
-
#
|
|
79
|
+
# CA_FLOAT64([-0.4]) % 1.0 # => [ 0.6 ]
|
|
79
80
|
def %(other); end
|
|
80
81
|
|
|
81
82
|
# @overload mod(other)
|
|
@@ -109,7 +110,7 @@ class CArray
|
|
|
109
110
|
# @raise [CArray::DataTypeError] for a complex array.
|
|
110
111
|
# @example
|
|
111
112
|
# CA_INT32([-7, -1, 7]).fmod(3) # => [ -1, -1, 1 ]
|
|
112
|
-
#
|
|
113
|
+
# CA_FLOAT64([-0.4]).fmod(1.0) # => [ -0.4 ]
|
|
113
114
|
def fmod(other); end
|
|
114
115
|
|
|
115
116
|
# @overload fmod!(other)
|
|
@@ -179,6 +180,13 @@ class CArray
|
|
|
179
180
|
# `BigDecimal` stay exact). Boolean arrays participate as their 0/1
|
|
180
181
|
# storage and promote to `:int64`, so a difference can reach `-1`.
|
|
181
182
|
# Masked elements stay masked.
|
|
183
|
+
#
|
|
184
|
+
# An integer result that does not fit the type wraps, as in C. An
|
|
185
|
+
# Integer (or integer CScalar) `other` that the integer `data_type` of
|
|
186
|
+
# `self` can not hold is taken modulo 2 ** bits the same way, so
|
|
187
|
+
# `CA_UINT8([1]) + 256` is `[1]` and `+ -1` is the same as `- 1`; `&`,
|
|
188
|
+
# `|`, `^`, `-` and `*` take it so too. A store is not an operation:
|
|
189
|
+
# `a[0] = 256` into a uint8 array raises `RangeError`.
|
|
182
190
|
# @param other [CArray, Numeric] addend, broadcast to `self.shape`.
|
|
183
191
|
# @return [CArray] result of the promoted `data_type` of the two
|
|
184
192
|
# operands.
|
|
@@ -236,8 +244,17 @@ class CArray
|
|
|
236
244
|
# grows roughly in proportion to the exponent (tens of ulps at 100,
|
|
237
245
|
# hundreds of thousands at a million), where `Float#**` and the same
|
|
238
246
|
# exponent given as a Float are within an ulp or so; give the exponent
|
|
239
|
-
# as a Float when a large one needs full precision.
|
|
240
|
-
#
|
|
247
|
+
# as a Float when a large one needs full precision. An Integer
|
|
248
|
+
# exponent beyond 64 bits is taken as a Float (the power is then 0, 1,
|
|
249
|
+
# an infinity or NaN).
|
|
250
|
+
# On an integer array an Integer (or integer CScalar) exponent is a
|
|
251
|
+
# count of multiplications, of any size: `CA_UINT8([2]) ** 10` is `[0]`,
|
|
252
|
+
# as 2 multiplied by itself 10 times is in uint8.
|
|
253
|
+
# An Integer (or integer CScalar) base on the left that the integer
|
|
254
|
+
# `data_type` of the exponents can not hold is cut to the type where
|
|
255
|
+
# the exponent is 0 or more, and gives 0 where it is negative (`1 / b
|
|
256
|
+
# ** p` in integer division): `1000 ** CA_INT8([2, -1])` is `[64, 0]`,
|
|
257
|
+
# the power computed wide and cut to int8.
|
|
241
258
|
# Masked elements stay masked.
|
|
242
259
|
# @param other [CArray, Numeric] exponent, broadcast to `self.shape`.
|
|
243
260
|
# @return [CArray] result of the promoted `data_type` of the two
|
|
@@ -247,11 +264,10 @@ class CArray
|
|
|
247
264
|
# CA_INT32([2]) ** -1 # => [ 0 ]
|
|
248
265
|
def **(other); end
|
|
249
266
|
|
|
250
|
-
# @overload
|
|
267
|
+
# @overload pow(other)
|
|
251
268
|
# Alias of {#**}.
|
|
252
|
-
# @param other [CArray, Numeric] exponent.
|
|
253
269
|
# @return [CArray]
|
|
254
|
-
def
|
|
270
|
+
def pow(other); end
|
|
255
271
|
|
|
256
272
|
# @overload rcp_mul(other)
|
|
257
273
|
# Returns `other` divided element-wise by `self` -- the reciprocal
|
|
@@ -262,13 +278,15 @@ class CArray
|
|
|
262
278
|
# operands.
|
|
263
279
|
# @raise [ZeroDivisionError] when an integer element of `self` is `0`.
|
|
264
280
|
# @example
|
|
265
|
-
#
|
|
281
|
+
# CA_FLOAT64([1.0, 2.0, 4.0]).rcp_mul(2.0) # => [ 2.0, 1.0, 0.5 ]
|
|
266
282
|
def rcp_mul(other); end
|
|
267
283
|
|
|
268
284
|
# @overload -@
|
|
269
285
|
# Returns the element-wise negation of `self`, keeping `self`'s
|
|
270
286
|
# `data_type`. A boolean array promotes to `:int64`. An `:object`
|
|
271
|
-
# array delegates to each element's `#-@`.
|
|
287
|
+
# array delegates to each element's `#-@`. An integer result the type
|
|
288
|
+
# cannot hold wraps modulo 2 ** bits, as `+` and `*` do:
|
|
289
|
+
# `-CA_UINT8([5])` is `[251]` and `-CA_INT8([-128])` is `[-128]`.
|
|
272
290
|
# @return [CArray]
|
|
273
291
|
def -@; end
|
|
274
292
|
|
|
@@ -283,8 +301,8 @@ class CArray
|
|
|
283
301
|
# A numeric array keeps its `data_type`; a complex array returns the
|
|
284
302
|
# real magnitude at that complex type's own width, so a `:cmplx64`
|
|
285
303
|
# yields `:float32` just as {#real} and {#imag} do. An `:object`
|
|
286
|
-
# array calls each cell's `abs`.
|
|
287
|
-
#
|
|
304
|
+
# array calls each cell's `abs`. An integer result the type cannot
|
|
305
|
+
# hold wraps modulo 2 ** bits: `CA_INT8([-128]).abs` is `[-128]`.
|
|
288
306
|
# @return [CArray] `self`'s `data_type` for numeric and `:object`
|
|
289
307
|
# input; the real component type for complex input.
|
|
290
308
|
# @raise [CArray::DataTypeError] for a boolean array.
|
|
@@ -292,18 +310,21 @@ class CArray
|
|
|
292
310
|
# CA_CMPLX64([Complex(3, 4)]).abs # => [ 5.0 ] (:float32)
|
|
293
311
|
def abs; end
|
|
294
312
|
|
|
295
|
-
# @overload
|
|
296
|
-
# Returns the element-wise magnitude of `self
|
|
297
|
-
# `
|
|
298
|
-
#
|
|
299
|
-
#
|
|
300
|
-
#
|
|
301
|
-
#
|
|
302
|
-
|
|
313
|
+
# @overload abs2
|
|
314
|
+
# Returns the element-wise squared magnitude of `self`: `x * x` for a
|
|
315
|
+
# real array, `re * re + im * im` for a complex one. A complex array
|
|
316
|
+
# answers in the real type of its own width (`:cmplx64` gives
|
|
317
|
+
# `:float32`), as {#abs} does; a real array keeps its `data_type`,
|
|
318
|
+
# and an integer result the type cannot hold wraps modulo 2 ** bits
|
|
319
|
+
# (`CA_INT8([100]).abs2` is `[16]`).
|
|
320
|
+
# @return [CArray]
|
|
321
|
+
# @raise [CArray::DataTypeError] for a boolean or `:object` array.
|
|
322
|
+
def abs2; end
|
|
303
323
|
|
|
304
324
|
# @overload square
|
|
305
325
|
# Returns `self * self` element-wise, keeping `self`'s `data_type`
|
|
306
|
-
# (a boolean promotes to `:int64`).
|
|
326
|
+
# (a boolean promotes to `:int64`). An integer result the type cannot
|
|
327
|
+
# hold wraps modulo 2 ** bits, as `*` does.
|
|
307
328
|
# @return [CArray]
|
|
308
329
|
def square; end
|
|
309
330
|
|
|
@@ -324,7 +345,7 @@ class CArray
|
|
|
324
345
|
# @return [CArray] `:float64`, or `self`'s own float/complex type.
|
|
325
346
|
# @raise [CArray::DataTypeError] for a boolean array.
|
|
326
347
|
# @example
|
|
327
|
-
#
|
|
348
|
+
# CA_FLOAT64([4.0, 16.0]).rsqrt # => [ 0.5, 0.25 ]
|
|
328
349
|
def rsqrt; end
|
|
329
350
|
|
|
330
351
|
# @overload sign
|
|
@@ -334,7 +355,7 @@ class CArray
|
|
|
334
355
|
# @return [CArray] same `data_type` as `self`.
|
|
335
356
|
# @raise [CArray::DataTypeError] for an `:object` array.
|
|
336
357
|
# @example
|
|
337
|
-
#
|
|
358
|
+
# CA_FLOAT64([-3.0, 0.0, 2.0]).sign # => [ -1.0, 0.0, 1.0 ]
|
|
338
359
|
def sign; end
|
|
339
360
|
|
|
340
361
|
# @overload zero
|
|
@@ -369,16 +390,9 @@ class CArray
|
|
|
369
390
|
# component type of `self`.
|
|
370
391
|
# @raise [CArray::DataTypeError] for a boolean or `:object` array.
|
|
371
392
|
# @example
|
|
372
|
-
#
|
|
393
|
+
# CA_FLOAT64([-1.0, 1.0]).arg # => [ 3.141592653589793, 0.0 ]
|
|
373
394
|
def arg; end
|
|
374
395
|
|
|
375
|
-
# @overload imag_i
|
|
376
|
-
# Returns the element-wise imaginary part, keeping `self`'s
|
|
377
|
-
# `data_type` -- a complex array stays complex (real part zero) and
|
|
378
|
-
# a real array yields zeros. See {#imag} for the real-valued form.
|
|
379
|
-
# @return [CArray] same `data_type` as `self` (`:int64` for boolean).
|
|
380
|
-
def imag_i; end
|
|
381
|
-
|
|
382
396
|
# @overload floor
|
|
383
397
|
# Returns the element-wise largest integral value not greater than
|
|
384
398
|
# each element, keeping `self`'s `data_type` (a `:float64` stays
|
|
@@ -489,7 +503,7 @@ class CArray
|
|
|
489
503
|
# own float type.
|
|
490
504
|
# @raise [CArray::DataTypeError] for a boolean or complex array.
|
|
491
505
|
# @example
|
|
492
|
-
#
|
|
506
|
+
# CA_FLOAT64([8.0, 1.0, 0.5]).logb # => [ 3.0, 0.0, -1.0 ]
|
|
493
507
|
def logb; end
|
|
494
508
|
|
|
495
509
|
# @overload sin
|
|
@@ -665,7 +679,7 @@ class CArray
|
|
|
665
679
|
# own float type.
|
|
666
680
|
# @raise [CArray::DataTypeError] for a boolean or complex array.
|
|
667
681
|
# @example
|
|
668
|
-
#
|
|
682
|
+
# CA_FLOAT64([270.0]).deg_180 # => [ -90.0 ]
|
|
669
683
|
def deg_180; end
|
|
670
684
|
|
|
671
685
|
# @overload deg_360
|
|
@@ -675,7 +689,7 @@ class CArray
|
|
|
675
689
|
# own float type.
|
|
676
690
|
# @raise [CArray::DataTypeError] for a boolean or complex array.
|
|
677
691
|
# @example
|
|
678
|
-
#
|
|
692
|
+
# CA_FLOAT64([-10.0]).deg_360 # => [ 350.0 ]
|
|
679
693
|
def deg_360; end
|
|
680
694
|
|
|
681
695
|
# @overload rad_pi
|
|
@@ -699,54 +713,55 @@ class CArray
|
|
|
699
713
|
# `NaN`: where one element is `NaN` the other is returned, and only
|
|
700
714
|
# two `NaN`s give `NaN`. Of `-0.0` and `0.0` the result is `0.0`,
|
|
701
715
|
# in either order. For the form that lets a `NaN` win see {#maximum}.
|
|
716
|
+
#
|
|
717
|
+
# On an integer array an Integer `other` the type can not hold is
|
|
718
|
+
# taken by value: one below the type is never the larger, so the
|
|
719
|
+
# cells are returned as they are (`CA_INT8([5]).pmax(-1000)` is
|
|
720
|
+
# `[5]`); one above it would be the answer in every cell, which the
|
|
721
|
+
# type can not hold, so it raises `RangeError`.
|
|
702
722
|
# @param other [CArray, Numeric] the other operand, broadcast to
|
|
703
723
|
# `self.shape`.
|
|
704
724
|
# @return [CArray] result of the promoted `data_type` of the two
|
|
705
725
|
# operands (`:int64` for boolean).
|
|
706
726
|
# @raise [CArray::DataTypeError] for a complex array, which has no
|
|
707
727
|
# ordering.
|
|
728
|
+
# @raise [RangeError] for an Integer `other` above the integer type.
|
|
708
729
|
# @example
|
|
709
|
-
#
|
|
730
|
+
# CA_FLOAT64([Float::NAN]).pmax(1.0) # => [ 1.0 ]
|
|
710
731
|
def pmax(other); end
|
|
711
732
|
|
|
712
733
|
# @overload pmin(other)
|
|
713
734
|
# Returns the element-wise smaller of `self` and `other`, ignoring
|
|
714
735
|
# `NaN`. Of `-0.0` and `0.0` the result is `-0.0`, in either order.
|
|
715
|
-
# The counterpart of {#pmax}
|
|
736
|
+
# The counterpart of {#pmax}: an Integer `other` above the integer
|
|
737
|
+
# type leaves the cells as they are, one below it raises.
|
|
716
738
|
# @param other [CArray, Numeric] the other operand.
|
|
717
739
|
# @return [CArray]
|
|
718
740
|
# @raise [CArray::DataTypeError] for a complex array.
|
|
741
|
+
# @raise [RangeError] for an Integer `other` below the integer type.
|
|
719
742
|
def pmin(other); end
|
|
720
743
|
|
|
721
|
-
# @overload fmax(other)
|
|
722
|
-
# Alias of {#pmax}, under the name C gives it.
|
|
723
|
-
# @param other [CArray, Numeric] the other operand.
|
|
724
|
-
# @return [CArray]
|
|
725
|
-
def fmax(other); end
|
|
726
|
-
|
|
727
|
-
# @overload fmin(other)
|
|
728
|
-
# Alias of {#pmin}, under the name C gives it.
|
|
729
|
-
# @param other [CArray, Numeric] the other operand.
|
|
730
|
-
# @return [CArray]
|
|
731
|
-
def fmin(other); end
|
|
732
|
-
|
|
733
744
|
# @overload maximum(other)
|
|
734
745
|
# Returns the element-wise larger of `self` and `other`,
|
|
735
746
|
# propagating `NaN`: where either element is `NaN` the result is
|
|
736
747
|
# `NaN`. Use this when a `NaN` must not be silently dropped, and
|
|
737
|
-
# {#pmax} when it should be skipped.
|
|
748
|
+
# {#pmax} when it should be skipped. An Integer `other` the integer
|
|
749
|
+
# type can not hold is taken as {#pmax} takes it. A time array and a
|
|
750
|
+
# fixed-length string array hold no NaN, so for them `maximum` and
|
|
751
|
+
# {#pmax} give the same answer.
|
|
738
752
|
# @param other [CArray, Numeric] the other operand, broadcast to
|
|
739
753
|
# `self.shape`.
|
|
740
754
|
# @return [CArray] result of the promoted `data_type` of the two
|
|
741
755
|
# operands (`:int64` for boolean).
|
|
742
756
|
# @raise [CArray::DataTypeError] for a complex array.
|
|
743
757
|
# @example
|
|
744
|
-
#
|
|
758
|
+
# CA_FLOAT64([Float::NAN]).maximum(1.0) # => [ NaN ]
|
|
745
759
|
def maximum(other); end
|
|
746
760
|
|
|
747
761
|
# @overload minimum(other)
|
|
748
762
|
# Returns the element-wise smaller of `self` and `other`,
|
|
749
|
-
# propagating `NaN`. The counterpart of {#maximum}
|
|
763
|
+
# propagating `NaN`. The counterpart of {#maximum}; an Integer `other`
|
|
764
|
+
# is taken as {#pmin} takes it.
|
|
750
765
|
# @param other [CArray, Numeric] the other operand.
|
|
751
766
|
# @return [CArray]
|
|
752
767
|
# @raise [CArray::DataTypeError] for a complex array.
|
|
@@ -760,7 +775,7 @@ class CArray
|
|
|
760
775
|
# @return [CArray] result of the promoted `data_type` of the three
|
|
761
776
|
# operands.
|
|
762
777
|
# @example
|
|
763
|
-
#
|
|
778
|
+
# CA_FLOAT64([2.0]).fma(3.0, 4.0) # => [ 10.0 ]
|
|
764
779
|
def fma(a, b); end
|
|
765
780
|
|
|
766
781
|
# @overload fms(a, b)
|
|
@@ -770,7 +785,7 @@ class CArray
|
|
|
770
785
|
# @param b [CArray, Numeric] subtrahend.
|
|
771
786
|
# @return [CArray]
|
|
772
787
|
# @example
|
|
773
|
-
#
|
|
788
|
+
# CA_FLOAT64([2.0]).fms(3.0, 4.0) # => [ 2.0 ]
|
|
774
789
|
def fms(a, b); end
|
|
775
790
|
|
|
776
791
|
# @overload eq(other)
|
|
@@ -784,13 +799,45 @@ class CArray
|
|
|
784
799
|
# point equality is exact here; for a tolerant comparison see
|
|
785
800
|
# {#is_close} (absolute) or {#is_equiv} (relative). Integers compare
|
|
786
801
|
# by value, as for {#<}.
|
|
802
|
+
#
|
|
803
|
+
# `eq(UNDEF)` asks the mask, as {#is_masked} does. `nil`, a String, a
|
|
804
|
+
# Symbol or another value that is not a number is no value of a numeric
|
|
805
|
+
# or boolean array, so `eq` is false in every cell there; an `:object`
|
|
806
|
+
# or `:fixlen` array compares it like any other value.
|
|
787
807
|
# @param other [CArray, Numeric, Object] comparand, broadcast to
|
|
788
808
|
# `self.shape`.
|
|
789
809
|
# @return [CArray] `:boolean`, same shape as `self`.
|
|
790
810
|
# @example
|
|
791
|
-
#
|
|
811
|
+
# CA_FLOAT64([1.0, 2.0]).eq(2.0) # => [ false, true ]
|
|
792
812
|
def eq(other); end
|
|
793
813
|
|
|
814
|
+
# @overload match(pattern)
|
|
815
|
+
# Returns a boolean array that is true where the cell matches
|
|
816
|
+
# `pattern` with Ruby's `=~`. Takes an `:object` array of Strings and
|
|
817
|
+
# a `:fixlen` array (each cell read as a String); a masked cell gives a
|
|
818
|
+
# masked result.
|
|
819
|
+
# @param pattern [Regexp]
|
|
820
|
+
# @return [CArray] `:boolean`, same shape as `self`.
|
|
821
|
+
# @raise [TypeError] for a numeric array.
|
|
822
|
+
# @example
|
|
823
|
+
# CA_OBJECT(%w[ab cd]).match(/a/) # => [ true, false ]
|
|
824
|
+
def match(pattern); end
|
|
825
|
+
|
|
826
|
+
# @overload =~(pattern)
|
|
827
|
+
# Alias of {#match}.
|
|
828
|
+
# @return [CArray]
|
|
829
|
+
def =~(pattern); end
|
|
830
|
+
|
|
831
|
+
# @overload is_kind_of(klass)
|
|
832
|
+
# Returns a boolean array that is true where the cell is a
|
|
833
|
+
# `klass` (Ruby's `kind_of?`). Takes an `:object` array.
|
|
834
|
+
# @param klass [Class, Module]
|
|
835
|
+
# @return [CArray] `:boolean`, same shape as `self`.
|
|
836
|
+
# @raise [TypeError] for a numeric array.
|
|
837
|
+
# @example
|
|
838
|
+
# CA_OBJECT([1, "a", 2.0]).is_kind_of(Integer) # => [ true, false, false ]
|
|
839
|
+
def is_kind_of(klass); end
|
|
840
|
+
|
|
794
841
|
# @overload ne(other)
|
|
795
842
|
# Returns a boolean array that is true where `self` and `other`
|
|
796
843
|
# differ element-wise. The negation of {#eq}.
|
|
@@ -879,33 +926,41 @@ class CArray
|
|
|
879
926
|
# @raise [TypeError] for any non-float `data_type`.
|
|
880
927
|
def feq(other); end
|
|
881
928
|
|
|
882
|
-
# @overload is_close(other,
|
|
929
|
+
# @overload is_close(other, tol)
|
|
883
930
|
# Returns a boolean array that is true where `self` and `other`
|
|
884
931
|
# agree element-wise within an **absolute** tolerance:
|
|
885
|
-
# `|self - other| <=
|
|
886
|
-
# magnitude of the difference.
|
|
932
|
+
# `|self - other| <= tol`. Complex arrays compare by the
|
|
933
|
+
# magnitude of the difference. Integers compare by their values:
|
|
934
|
+
# the difference is exact, also beyond 2**53, beside an Integer
|
|
935
|
+
# beyond the array's type, and between signed and unsigned arrays.
|
|
887
936
|
# @param other [CArray, Numeric] comparand, broadcast to
|
|
888
937
|
# `self.shape`.
|
|
889
|
-
# @param
|
|
938
|
+
# @param tol [Numeric] largest accepted absolute difference, zero
|
|
939
|
+
# or positive.
|
|
890
940
|
# @return [CArray] `:boolean`.
|
|
941
|
+
# @raise [ArgumentError] when `tol` is negative or NaN.
|
|
891
942
|
# @example
|
|
892
|
-
#
|
|
893
|
-
def is_close(other,
|
|
943
|
+
# CA_FLOAT64([1000.0]).is_close(1001.0, 1.0) # => [ true ]
|
|
944
|
+
def is_close(other, tol); end
|
|
894
945
|
|
|
895
|
-
# @overload is_equiv(other,
|
|
946
|
+
# @overload is_equiv(other, tol)
|
|
896
947
|
# Returns a boolean array that is true where `self` and `other`
|
|
897
948
|
# agree element-wise within a **relative** tolerance:
|
|
898
|
-
# `|self - other| / max(|self|, |other|) <=
|
|
949
|
+
# `|self - other| / max(|self|, |other|) <= tol`, with
|
|
899
950
|
# exactly equal elements always true. Prefer this to {#is_close}
|
|
900
|
-
# when the elements span several orders of magnitude.
|
|
951
|
+
# when the elements span several orders of magnitude. Integers
|
|
952
|
+
# compare by their values as in {#is_close}: two different
|
|
953
|
+
# integers are never equivalent at `tol = 0`.
|
|
901
954
|
# @param other [CArray, Numeric] comparand, broadcast to
|
|
902
955
|
# `self.shape`.
|
|
903
|
-
# @param
|
|
956
|
+
# @param tol [Numeric] largest accepted relative difference, zero
|
|
957
|
+
# or positive.
|
|
904
958
|
# @return [CArray] `:boolean`.
|
|
959
|
+
# @raise [ArgumentError] when `tol` is negative or NaN.
|
|
905
960
|
# @example
|
|
906
|
-
#
|
|
907
|
-
#
|
|
908
|
-
def is_equiv(other,
|
|
961
|
+
# CA_FLOAT64([1000.0]).is_equiv(1001.0, 0.01) # => [ true ]
|
|
962
|
+
# CA_FLOAT64([0.001]).is_equiv(0.002, 0.01) # => [ false ]
|
|
963
|
+
def is_equiv(other, tol); end
|
|
909
964
|
|
|
910
965
|
# @overload is_nan
|
|
911
966
|
# Returns a boolean array that is true where an element is `NaN`.
|
|
@@ -938,7 +993,7 @@ class CArray
|
|
|
938
993
|
# with {#mask_where} to mask the elements a computation cannot use.
|
|
939
994
|
# @return [CArray] `:boolean`.
|
|
940
995
|
# @example
|
|
941
|
-
#
|
|
996
|
+
# CA_FLOAT64([Float::NAN, 1.0/0, 1.0]).is_invalid # => [ true, true, false ]
|
|
942
997
|
def is_invalid; end
|
|
943
998
|
|
|
944
999
|
# @overload signbit
|
|
@@ -950,7 +1005,7 @@ class CArray
|
|
|
950
1005
|
# @return [CArray] `:boolean`.
|
|
951
1006
|
# @raise [CArray::DataTypeError] for a complex array.
|
|
952
1007
|
# @example
|
|
953
|
-
#
|
|
1008
|
+
# CA_FLOAT64([-1.0, 0.0, -0.0]).signbit # => [ true, false, true ]
|
|
954
1009
|
def signbit; end
|
|
955
1010
|
|
|
956
1011
|
# @overload &(other)
|
|
@@ -965,11 +1020,21 @@ class CArray
|
|
|
965
1020
|
# genuinely depends on a masked element is the result masked. So
|
|
966
1021
|
# `(a & b).not` is `true` where `a` is `false`, whatever `b` is,
|
|
967
1022
|
# while `a.and(b).not` stays masked where `b` is.
|
|
1023
|
+
#
|
|
1024
|
+
# On a boolean array, `other` is `true` / `false`, a boolean array,
|
|
1025
|
+
# or the integer `1` / `0`, which is read as `true` / `false`. The
|
|
1026
|
+
# cells of an object array are read by the same rule, and the result
|
|
1027
|
+
# is boolean. Any other value in an object array raises. Any other
|
|
1028
|
+
# number, and an array of numbers, has no truth value here and
|
|
1029
|
+
# raises: compare it (`ne(0)`) for its truth, or cast the boolean
|
|
1030
|
+
# array (`to_type`) for integer bits.
|
|
968
1031
|
# @param other [CArray, Integer, true, false] the other operand,
|
|
969
1032
|
# broadcast to `self.shape`.
|
|
970
1033
|
# @return [CArray] `:boolean` for boolean operands, otherwise the
|
|
971
1034
|
# promoted integer `data_type`.
|
|
972
|
-
# @raise [CArray::DataTypeError] for a float or complex array
|
|
1035
|
+
# @raise [CArray::DataTypeError] for a float or complex array, and
|
|
1036
|
+
# for a boolean array beside a number other than `1` / `0` or
|
|
1037
|
+
# an array of numbers, or an object array holding anything else.
|
|
973
1038
|
def &(other); end
|
|
974
1039
|
|
|
975
1040
|
# @overload bit_and(other)
|
|
@@ -984,11 +1049,21 @@ class CArray
|
|
|
984
1049
|
# **On boolean arrays it is three-valued (Kleene) as {#&} is; {#or}
|
|
985
1050
|
# is the two-valued form.** An unknown element `OR` `true` is
|
|
986
1051
|
# `true`.
|
|
1052
|
+
#
|
|
1053
|
+
# On a boolean array, `other` is `true` / `false`, a boolean array,
|
|
1054
|
+
# or the integer `1` / `0`, which is read as `true` / `false`. The
|
|
1055
|
+
# cells of an object array are read by the same rule, and the result
|
|
1056
|
+
# is boolean. Any other value in an object array raises. Any other
|
|
1057
|
+
# number, and an array of numbers, has no truth value here and
|
|
1058
|
+
# raises: compare it (`ne(0)`) for its truth, or cast the boolean
|
|
1059
|
+
# array (`to_type`) for integer bits.
|
|
987
1060
|
# @param other [CArray, Integer, true, false] the other operand,
|
|
988
1061
|
# broadcast to `self.shape`.
|
|
989
1062
|
# @return [CArray] `:boolean` for boolean operands, otherwise the
|
|
990
1063
|
# promoted integer `data_type`.
|
|
991
|
-
# @raise [CArray::DataTypeError] for a float or complex array
|
|
1064
|
+
# @raise [CArray::DataTypeError] for a float or complex array, and
|
|
1065
|
+
# for a boolean array beside a number other than `1` / `0` or
|
|
1066
|
+
# an array of numbers, or an object array holding anything else.
|
|
992
1067
|
def |(other); end
|
|
993
1068
|
|
|
994
1069
|
# @overload bit_or(other)
|
|
@@ -1005,11 +1080,21 @@ class CArray
|
|
|
1005
1080
|
# Unlike {#&} and {#|} this has no Kleene shortcut -- an exclusive
|
|
1006
1081
|
# or always depends on both operands -- so a masked element always
|
|
1007
1082
|
# gives a masked result.
|
|
1083
|
+
#
|
|
1084
|
+
# On a boolean array, `other` is `true` / `false`, a boolean array,
|
|
1085
|
+
# or the integer `1` / `0`, which is read as `true` / `false`. The
|
|
1086
|
+
# cells of an object array are read by the same rule, and the result
|
|
1087
|
+
# is boolean. Any other value in an object array raises. Any other
|
|
1088
|
+
# number, and an array of numbers, has no truth value here and
|
|
1089
|
+
# raises: compare it (`ne(0)`) for its truth, or cast the boolean
|
|
1090
|
+
# array (`to_type`) for integer bits.
|
|
1008
1091
|
# @param other [CArray, Integer, true, false] the other operand,
|
|
1009
1092
|
# broadcast to `self.shape`.
|
|
1010
1093
|
# @return [CArray] `:boolean` for boolean operands, otherwise the
|
|
1011
1094
|
# promoted integer `data_type`.
|
|
1012
|
-
# @raise [CArray::DataTypeError] for a float or complex array
|
|
1095
|
+
# @raise [CArray::DataTypeError] for a float or complex array, and
|
|
1096
|
+
# for a boolean array beside a number other than `1` / `0` or
|
|
1097
|
+
# an array of numbers, or an object array holding anything else.
|
|
1013
1098
|
def ^(other); end
|
|
1014
1099
|
|
|
1015
1100
|
# @overload bit_xor(other)
|
|
@@ -1075,7 +1160,7 @@ class CArray
|
|
|
1075
1160
|
# known -- the element-wise counterpart of keeping only complete
|
|
1076
1161
|
# records -- and {#&} when an answer the known side settles should
|
|
1077
1162
|
# stand.
|
|
1078
|
-
# @param other [CArray, true, false] the other operand, broadcast
|
|
1163
|
+
# @param other [CArray, true, false, 1, 0] the other operand, broadcast
|
|
1079
1164
|
# to `self.shape`.
|
|
1080
1165
|
# @return [CArray] `:boolean`.
|
|
1081
1166
|
# @raise [CArray::DataTypeError] for any `data_type` other than
|
|
@@ -1087,7 +1172,7 @@ class CArray
|
|
|
1087
1172
|
# masked element on either side makes the result masked**, as
|
|
1088
1173
|
# {#and} does. {#|} is the three-valued form: `true | U` is `true`,
|
|
1089
1174
|
# `true.or(U)` is `U`.
|
|
1090
|
-
# @param other [CArray, true, false] the other operand.
|
|
1175
|
+
# @param other [CArray, true, false, 1, 0] the other operand.
|
|
1091
1176
|
# @return [CArray] `:boolean`.
|
|
1092
1177
|
# @raise [CArray::DataTypeError] for any `data_type` other than
|
|
1093
1178
|
# `:boolean` or `:object`.
|
|
@@ -1096,7 +1181,7 @@ class CArray
|
|
|
1096
1181
|
# @overload xor(other)
|
|
1097
1182
|
# Returns the logical exclusive `OR` of two boolean arrays,
|
|
1098
1183
|
# propagating the mask as {#and} does.
|
|
1099
|
-
# @param other [CArray, true, false] the other operand.
|
|
1184
|
+
# @param other [CArray, true, false, 1, 0] the other operand.
|
|
1100
1185
|
# @return [CArray] `:boolean`.
|
|
1101
1186
|
# @raise [CArray::DataTypeError] for any `data_type` other than
|
|
1102
1187
|
# `:boolean` or `:object`.
|
|
@@ -1109,13 +1194,6 @@ class CArray
|
|
|
1109
1194
|
# @raise [CArray::DataTypeError] for a boolean array.
|
|
1110
1195
|
def abs!; end
|
|
1111
1196
|
|
|
1112
|
-
# @overload abs_i!
|
|
1113
|
-
# Applies {#abs_i} to `self` in place, keeping `self`'s
|
|
1114
|
-
# `data_type`.
|
|
1115
|
-
# @return [self]
|
|
1116
|
-
# @raise [CArray::DataTypeError] for a boolean array.
|
|
1117
|
-
def abs_i!; end
|
|
1118
|
-
|
|
1119
1197
|
# @overload acos!
|
|
1120
1198
|
# Applies {#acos} to `self` in place, keeping `self`'s
|
|
1121
1199
|
# `data_type`.
|
|
@@ -1375,13 +1453,6 @@ class CArray
|
|
|
1375
1453
|
# promotes it instead of raising.
|
|
1376
1454
|
def hypot!(other); end
|
|
1377
1455
|
|
|
1378
|
-
# @overload imag_i!
|
|
1379
|
-
# Applies {#imag_i} to `self` in place, keeping `self`'s
|
|
1380
|
-
# `data_type`.
|
|
1381
|
-
# @return [self]
|
|
1382
|
-
# @raise [CArray::DataTypeError] for a boolean array.
|
|
1383
|
-
def imag_i!; end
|
|
1384
|
-
|
|
1385
1456
|
# @overload log!
|
|
1386
1457
|
# Applies {#log} to `self` in place, keeping `self`'s
|
|
1387
1458
|
# `data_type`.
|
|
@@ -1523,15 +1594,6 @@ class CArray
|
|
|
1523
1594
|
# @raise [CArray::DataTypeError] for a boolean array.
|
|
1524
1595
|
def pmin!(other); end
|
|
1525
1596
|
|
|
1526
|
-
# @overload power!(other)
|
|
1527
|
-
# Applies {#power} to `self` in place, keeping `self`'s
|
|
1528
|
-
# `data_type`.
|
|
1529
|
-
# @param other [CArray, Numeric] the other operand, broadcast to
|
|
1530
|
-
# `self.shape`.
|
|
1531
|
-
# @return [self]
|
|
1532
|
-
# @raise [CArray::DataTypeError] for a boolean array.
|
|
1533
|
-
def power!(other); end
|
|
1534
|
-
|
|
1535
1597
|
# @overload rad!
|
|
1536
1598
|
# Applies {#rad} to `self` in place, keeping `self`'s
|
|
1537
1599
|
# `data_type`.
|