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)
إغلاق ينتج عنه
TangentVector
من الأصفار بنفسcount
self
.تصريح
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
ينشئ
Array
بنفس الشكل والكميات القياسية مثل مثيلnumpy.ndarray
المحدد.شرط مسبق
يجب تثبيت حزمة Pythonnumpy
.تصريح
public init?(numpy numpyArray: PythonObject)
حدود
numpyArray
مثيل
numpy.ndarray
المطلوب تحويله.قيمة الإرجاع
تم تحويل
numpyArray
إلىArray
. يُرجعnil
إذا لم يكنnumpyArray
ثنائي الأبعاد أو لا يحتوي علىdtype
عددي متوافق.ينشئ مثيل
numpy.ndarray
أحادي الأبعاد بنفس الكميات الموجودة في هذاArray
.شرط مسبق
يجب تثبيت حزمة Pythonnumpy
.تصريح
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>
اثنان مرفوع للقوة
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>
تصريح
public init(_owning tensorHandles: UnsafePointer<CTensorHandle>?, count: Int)
تصريح
public init<C: RandomAccessCollection>( _handles: C ) where C.Element: _AnyTensorHandle
ملحوظة
يبلغ طول تجزئة SHA1 20 بايت فقط، وبالتالي فإن أول 20 بايت فقط منSIMD32<UInt8>
التي تم إرجاعها ليست صفرًا.تصريح
func sha1() -> SIMD32<UInt8>
تصريح
func sha512() -> SIMD64<UInt8>
a || b
عنصريًا كما لو كنا ندمج قناعين معًا.تصريح
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