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
-
The view of an array as the differentiable product manifold of
Element
multiplied with itselfcount
times.Declaration
@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
-
Declaration
public typealias AllKeyPaths = [PartialKeyPath<Array>]
-
Declaration
public var allKeyPaths: [PartialKeyPath<Array>] { get }
-
Declaration
public typealias TangentVector = Array<Element.TangentVector>.DifferentiableView
-
Declaration
public mutating mutating func move(along direction: TangentVector)
-
A closure that produces a
TangentVector
of zeros with the samecount
asself
.Declaration
public var zeroTangentVectorInitializer: () -> TangentVector { get }
-
Declaration
public var differentiableVectorView: TangentVector { get }
-
Declaration
@derivative init(repeating: count)
-
Declaration
@differentiable(wrt: self) public func differentiableMap<Result: Differentiable>( _ body: @differentiable (Element) -> Result ) -> [Result]
-
Declaration
@differentiable(wrt: (self, initialResult) public func differentiableReduce<Result: Differentiable>( _ initialResult: Result, _ nextPartialResult: @differentiable (Result, Element) -> Result ) -> Result
-
Creates an
Array
with the same shape and scalars as the specifiednumpy.ndarray
instance.Precondition
Thenumpy
Python package must be installed.Declaration
public init?(numpy numpyArray: PythonObject)
Parameters
numpyArray
The
numpy.ndarray
instance to convert.Return Value
numpyArray
converted to anArray
. Returnsnil
ifnumpyArray
is not 1-D or does not have a compatible scalardtype
. -
Creates a 1-D
numpy.ndarray
instance with the same scalars as thisArray
.Precondition
Thenumpy
Python package must be installed.Declaration
func makeNumpyArray() -> PythonObject
-
Declaration
public var pythonObject: PythonObject { get }
-
Declaration
public init?(_ pythonObject: PythonObject)
-
The square root of
x
.For real types, if
x
is negative the result is.nan
. For complex types there is a branch cut on the negative real axis.Declaration
public static func sqrt(_ x: `Self`) -> Array<Element>
-
The cosine of
x
, interpreted as an angle in radians.Declaration
public static func cos(_ x: `Self`) -> Array<Element>
-
The sine of
x
, interpreted as an angle in radians.Declaration
public static func sin(_ x: `Self`) -> Array<Element>
-
The tangent of
x
, interpreted as an angle in radians.Declaration
public static func tan(_ x: `Self`) -> Array<Element>
-
The inverse cosine of
x
in radians.Declaration
public static func acos(_ x: `Self`) -> Array<Element>
-
The inverse sine of
x
in radians.Declaration
public static func asin(_ x: `Self`) -> Array<Element>
-
The inverse tangent of
x
in radians.Declaration
public static func atan(_ x: `Self`) -> Array<Element>
-
The hyperbolic cosine of
x
.Declaration
public static func cosh(_ x: `Self`) -> Array<Element>
-
The hyperbolic sine of
x
.Declaration
public static func sinh(_ x: `Self`) -> Array<Element>
-
The hyperbolic tangent of
x
.Declaration
public static func tanh(_ x: `Self`) -> Array<Element>
-
The inverse hyperbolic cosine of
x
.Declaration
public static func acosh(_ x: `Self`) -> Array<Element>
-
The inverse hyperbolic sine of
x
.Declaration
public static func asinh(_ x: `Self`) -> Array<Element>
-
The inverse hyperbolic tangent of
x
.Declaration
public static func atanh(_ x: `Self`) -> Array<Element>
-
The exponential function applied to
x
, ore**x
.Declaration
public static func exp(_ x: `Self`) -> Array<Element>
-
Two raised to to power
x
.Declaration
public static func exp2(_ x: `Self`) -> Array<Element>
-
Ten raised to to power
x
.Declaration
public static func exp10(_ x: `Self`) -> Array<Element>
-
exp(x) - 1
evaluated so as to preserve accuracy close to zero.Declaration
public static func expm1(_ x: `Self`) -> Array<Element>
-
The natural logarithm of
x
.Declaration
public static func log(_ x: `Self`) -> Array<Element>
-
The base-two logarithm of
x
.Declaration
public static func log2(_ x: `Self`) -> Array<Element>
-
The base-ten logarithm of
x
.Declaration
public static func log10(_ x: `Self`) -> Array<Element>
-
log(1 + x)
evaluated so as to preserve accuracy close to zero.Declaration
public static func log1p(_ x: `Self`) -> Array<Element>
-
exp(y log(x))
computed without loss of intermediate precision.For real types, if
x
is negative the result is NaN, even ify
has an integral value. For complex types, there is a branch cut on the negative real axis.Declaration
public static func pow(_ x: `Self`, _ y: `Self`) -> Array<Element>
-
x
raised to then
th power.The product of
n
copies ofx
.Declaration
public static func pow(_ x: `Self`, _ n: Int) -> Array<Element>
-
The
n
th root ofx
.For real types, if
x
is negative andn
is even, the result is NaN. For complex types, there is a branch cut along the negative real axis.Declaration
public static func root(_ x: `Self`, _ n: Int) -> Array<Element>
-
Declaration
public init(_owning tensorHandles: UnsafePointer<CTensorHandle>?, count: Int)
-
Declaration
public init<C: RandomAccessCollection>( _handles: C ) where C.Element: _AnyTensorHandle
-
Note
The SHA1 hash is only 20 bytes long and so only the first 20 bytes of the returnedSIMD32<UInt8>
are non-zero.Declaration
func sha1() -> SIMD32<UInt8>
-
Declaration
func sha512() -> SIMD64<UInt8>
-
Computes
a || b
elementwise as though we were or-ing together two masks.Declaration
public func mergingMask(with other: [Bool]) -> [Bool]
-
Declaration
func withArrayRef<Result>(_ body: (Int64ArrayRef) throws -> Result) rethrows -> Result
-
Declaration
func withArrayRef<Result>(_ body: (OpaqueXLATensorArrayRef) throws -> Result) rethrows -> Result
-
Declaration
func withArrayRef<T, Result>(_ body: (OpaqueXLATensorArrayRef) throws -> Result) rethrows -> Result where Element == Tensor<T>
-
Declaration
func withArrayRef<Result>(_ body: (inout PaddingConfig) -> Result) -> Result