מערך

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 where Element == Bool
extension Array : ConvertibleFromPython where Element : ConvertibleFromPython
extension Array where Element == Int64
extension Array: ElementaryFunctions where Element: ElementaryFunctions
extension Array: TensorArrayProtocol where Element: TensorGroup
extension Array where Element == UInt8
extension Array where Element == XLATensor
extension Array where Element: AnyTensor
extension Array where Element == PaddingConfigDimension
זמין כאשר 'אלמנט': 'ניתן להבדיל'
זמין כאשר 'אלמנט': 'EuclideanDifferentiable'
זמין כאשר 'אלמנט': 'ניתן להבדיל'
  • הַצהָרָה

    @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
זמין כאשר `Element`: `NumpyScalarCompatible`
  • יוצר Array עם אותה צורה וסקלרים כמו מופע numpy.ndarray שצוין.

    תְנַאִי מוּקדָם

    יש להתקין את חבילת numpy Python.

    הַצהָרָה

    public init?(numpy numpyArray: PythonObject)

    פרמטרים

    numpyArray

    מופע numpy.ndarray להמרה.

    ערך החזרה

    numpyArray הומר Array . מחזירה nil אם numpyArray אינו 1-D או שאין לו dtype סקלרי תואם.

  • יוצר מופע numpy.ndarray 1-D עם אותם סקלרים כמו Array הזה.

    תְנַאִי מוּקדָם

    יש להתקין את חבילת numpy Python.

    הַצהָרָה

    func makeNumpyArray() -> PythonObject
זמין כאשר `Element`: `PythonConvertible`
זמין כאשר `Element`: `ConvertibleFromPython`
זמין כאשר 'Element': 'ElementaryFunctions'
  • השורש הריבועי של 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>
  • שניים מועלים לעוצמה x .

    הַצהָרָה

    public static func exp2(_ x: `Self`) -> Array<Element>
  • עשר מורם לעוצמה 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 .

    הַצהָרָה

    public static func log2(_ x: `Self`) -> Array<Element>
  • הלוגריתם של בסיס עשר של x .

    הַצהָרָה

    public static func log10(_ x: `Self`) -> Array<Element>
  • log(1 + x) מוערך כדי לשמור על דיוק קרוב לאפס.

    הַצהָרָה

    public static func log1p(_ x: `Self`) -> Array<Element>
  • exp(y log(x)) מחושב ללא אובדן דיוק ביניים.

    עבור טיפוסים אמיתיים, אם x הוא שלילי התוצאה היא NaN, גם אם y יש ערך אינטגרלי. עבור טיפוסים מורכבים, יש חתך ענף על הציר האמיתי השלילי.

    הַצהָרָה

    public static func pow(_ x: `Self`, _ y: `Self`) -> Array<Element>
  • x מוגדל בחזקת n .

    המכפלה של n עותקים של x .

    הַצהָרָה

    public static func pow(_ x: `Self`, _ n: Int) -> Array<Element>
  • השורש ה- n של x .

    עבור טיפוסים אמיתיים, אם x הוא שלילי ו- n זוגי, התוצאה היא NaN. עבור טיפוסים מורכבים, יש ענף חתוך לאורך הציר האמיתי השלילי.

    הַצהָרָה

    public static func root(_ x: `Self`, _ n: Int) -> Array<Element>
זמין כאשר `Element`: `TensorGroup`
  • הַצהָרָה

    public init(_owning tensorHandles: UnsafePointer<CTensorHandle>?, count: Int)
  • הַצהָרָה

    public init<C: RandomAccessCollection>(
      _handles: C
    ) where C.Element: _AnyTensorHandle
זמין כאשר `Element` == `UInt8`
  • הערה

    ה-hash SHA1 הוא רק באורך 20 בתים ולכן רק 20 הבתים הראשונים של SIMD32<UInt8> המוחזר אינם אפס.

    הַצהָרָה

    func sha1() -> SIMD32<UInt8>
  • הַצהָרָה

    func sha512() -> SIMD64<UInt8>
זמין כאשר `Element` == `Bool`
  • מחשב a || b יסודית כאילו היינו או מחברים יחד שתי מסכות.

    הַצהָרָה

    public func mergingMask(with other: [Bool]) -> [Bool]
זמין כאשר `Element` == `Int64`
  • הַצהָרָה

    func withArrayRef<Result>(_ body: (Int64ArrayRef) throws -> Result) rethrows -> Result
זמין כאשר `Element` == `XLATensor`
  • הַצהָרָה

    func withArrayRef<Result>(_ body: (OpaqueXLATensorArrayRef) throws -> Result) rethrows -> Result
זמין כאשר 'Element': 'AnyTensor'
  • הַצהָרָה

    func withArrayRef<T, Result>(_ body: (OpaqueXLATensorArrayRef) throws -> Result) rethrows
      -> Result
    where Element == Tensor<T>
זמין כאשר `Element` == `PaddingConfigDimension`
  • הַצהָרָה

    func withArrayRef<Result>(_ body: (inout PaddingConfig) -> Result) -> Result