extension Array: MutableCollectionAlgorithms
extension Array: KeyPathIterable
extension Array: Differentiable where Element: Differentiable
extension Array: EuclideanDifferentiable
where Element: EuclideanDifferentiable
extension Array where Element: Differentiable
extension Array : ConvertibleFromNumpyArray
where Element : NumpyScalarCompatible
public extension Array where Element : NumpyScalarCompatible
extension Array : PythonConvertible where Element : PythonConvertible
extension Array : ConvertibleFromPython where Element : ConvertibleFromPython
extension Array: ElementaryFunctions where Element: ElementaryFunctions
extension Array: TensorArrayProtocol where Element: TensorGroup
-extension Array where Element == UInt8
extension Array where Element == Bool
extension Array where Element == Int64
extension Array where Element == XLATensor
extension Array where Element: AnyTensor
extension Array where Element == PaddingConfigDimension
配列を
Element
の微分可能な積多様体としてそれ自体をcount
回乗算したものとして見る。宣言
@frozen public struct DifferentiableView
extension Array.DifferentiableView: Differentiable where Element: Differentiable
extension Array.DifferentiableView: EuclideanDifferentiable where Element: EuclideanDifferentiable
extension Array.DifferentiableView: Equatable where Element: Differentiable & Equatable
extension Array.DifferentiableView: ExpressibleByArrayLiteral where Element: Differentiable
extension Array.DifferentiableView: CustomStringConvertible where Element: Differentiable
extension Array.DifferentiableView: AdditiveArithmetic where Element: AdditiveArithmetic & Differentiable
extension Array.DifferentiableView: _KeyPathIterableBase where Element: Differentiable
extension Array.DifferentiableView: KeyPathIterable where Element: Differentiable
extension Array.DifferentiableView: ElementaryFunctions where Element: Differentiable & ElementaryFunctions
extension Array.DifferentiableView: BidirectionalCollection, Collection, MutableCollection, RandomAccessCollection, RangeReplaceableCollection, Sequence where Element: Differentiable
extension Array.DifferentiableView: VectorProtocol where Element: Differentiable & VectorProtocol
extension Array.DifferentiableView: PointwiseMultiplicative where Element: Differentiable & PointwiseMultiplicative
宣言
public typealias AllKeyPaths = [PartialKeyPath<Array>]
宣言
public var allKeyPaths: [PartialKeyPath<Array>] { get }
宣言
public typealias TangentVector = Array<Element.TangentVector>.DifferentiableView
宣言
public mutating mutating func move(along direction: TangentVector)
self
と同じcount
を持つゼロのTangentVector
を生成するクロージャ。宣言
public var zeroTangentVectorInitializer: () -> TangentVector { get }
宣言
public var differentiableVectorView: TangentVector { get }
宣言
@derivative init(repeating: count)
宣言
@differentiable(wrt: self) public func differentiableMap<Result: Differentiable>( _ body: @differentiable (Element) -> Result ) -> [Result]
宣言
@differentiable(wrt: (self, initialResult) public func differentiableReduce<Result: Differentiable>( _ initialResult: Result, _ nextPartialResult: @differentiable (Result, Element) -> Result ) -> Result
指定された
numpy.ndarray
インスタンスと同じ形状とスカラーを持つArray
を作成します。前提条件
numpy
Python パッケージをインストールする必要があります。宣言
public init?(numpy numpyArray: PythonObject)
パラメーター
numpyArray
変換する
numpy.ndarray
インスタンス。戻り値
numpyArray
Array
に変換しました。numpyArray
1 次元でない場合、または互換性のあるスカラーdtype
がない場合はnil
を返します。この
Array
と同じスカラーを持つ 1 次元のnumpy.ndarray
インスタンスを作成します。前提条件
numpy
Python パッケージをインストールする必要があります。宣言
func makeNumpyArray() -> PythonObject
宣言
public var pythonObject: PythonObject { get }
宣言
public init?(_ pythonObject: PythonObject)
x
の平方根。実数型の場合、
x
が負の場合、結果は.nan
になります。複合型の場合、負の実軸に分岐カットがあります。宣言
public static func sqrt(_ x: `Self`) -> Array<Element>
x
の余弦。ラジアン単位の角度として解釈されます。宣言
public static func cos(_ x: `Self`) -> Array<Element>
x
のサイン。ラジアン単位の角度として解釈されます。宣言
public static func sin(_ x: `Self`) -> Array<Element>
x
のタンジェント。ラジアン単位の角度として解釈されます。宣言
public static func tan(_ x: `Self`) -> Array<Element>
x
の逆余弦 (ラジアン単位)。宣言
public static func acos(_ x: `Self`) -> Array<Element>
x
の逆サイン (ラジアン単位)。宣言
public static func asin(_ x: `Self`) -> Array<Element>
x
の逆タンジェント (ラジアン単位)。宣言
public static func atan(_ x: `Self`) -> Array<Element>
x
の双曲線余弦。宣言
public static func cosh(_ x: `Self`) -> Array<Element>
x
の双曲線正弦。宣言
public static func sinh(_ x: `Self`) -> Array<Element>
x
の双曲線正接。宣言
public static func tanh(_ x: `Self`) -> Array<Element>
x
の逆双曲線余弦。宣言
public static func acosh(_ x: `Self`) -> Array<Element>
x
の逆双曲線正弦。宣言
public static func asinh(_ x: `Self`) -> Array<Element>
x
の逆双曲線正接。宣言
public static func atanh(_ x: `Self`) -> Array<Element>
x
またはe**x
に適用される指数関数。宣言
public static func exp(_ x: `Self`) -> Array<Element>
2 の
x
乗。宣言
public static func exp2(_ x: `Self`) -> Array<Element>
10 の
x
乗です。宣言
public static func exp10(_ x: `Self`) -> Array<Element>
exp(x) - 1
ゼロに近い精度を維持するように評価されます。宣言
public static func expm1(_ x: `Self`) -> Array<Element>
x
の自然対数。宣言
public static func log(_ x: `Self`) -> Array<Element>
x
の底 2 の対数。宣言
public static func log2(_ x: `Self`) -> Array<Element>
x
の 10 を底とする対数。宣言
public static func log10(_ x: `Self`) -> Array<Element>
log(1 + x)
ゼロに近い精度を維持するように評価されます。宣言
public static func log1p(_ x: `Self`) -> Array<Element>
exp(y log(x))
中間精度を失うことなく計算されます。実数型の場合、
x
が負の場合、y
整数値であっても結果は NaN になります。複合型の場合、負の実軸に分岐カットがあります。宣言
public static func pow(_ x: `Self`, _ y: `Self`) -> Array<Element>
x
のn
乗。x
のn
コピーの積。宣言
public static func pow(_ x: `Self`, _ n: Int) -> Array<Element>
x
のn
乗根。実数型の場合、
x
が負でn
が偶数の場合、結果は NaN になります。複合型の場合、負の実軸に沿って分岐が存在します。宣言
public static func root(_ x: `Self`, _ n: Int) -> Array<Element>
宣言
public init(_owning tensorHandles: UnsafePointer<CTensorHandle>?, count: Int)
宣言
public init<C: RandomAccessCollection>( _handles: C ) where C.Element: _AnyTensorHandle
注記
SHA1 ハッシュの長さはわずか 20 バイトであるため、返されるSIMD32<UInt8>
の最初の 20 バイトのみがゼロ以外です。宣言
func sha1() -> SIMD32<UInt8>
宣言
func sha512() -> SIMD64<UInt8>
a || b
計算します。a || b
要素ごとに、あたかも 2 つのマスクを論理和で結合しているかのように。宣言
public func mergingMask(with other: [Bool]) -> [Bool]
宣言
func withArrayRef<Result>(_ body: (Int64ArrayRef) throws -> Result) rethrows -> Result
宣言
func withArrayRef<Result>(_ body: (OpaqueXLATensorArrayRef) throws -> Result) rethrows -> Result
宣言
func withArrayRef<T, Result>(_ body: (OpaqueXLATensorArrayRef) throws -> Result) rethrows -> Result where Element == Tensor<T>
宣言
func withArrayRef<Result>(_ body: (inout PaddingConfig) -> Result) -> Result