scalarCount
Swift declarationvar scalarCount: Int { get }The number of scalars in the shaped array.
protocol · iOS 15.0+ · SDK 27.1
protocol MLShapedArrayProtocol<Scalar> : ExpressibleByArrayLiteral, MutableCollection, RandomAccessCollection where Self.Index == IntProtocol for the shaped array and the slice of shaped array.
var scalarCount: Int { get }The number of scalars in the shaped array.
var count: Int { get }The number of elements in the first axis
var scalar: Self.Scalar? { get set }Scalar value The getter returns `nil` if `!isScalar`.
var scalars: [Self.Scalar] { get set }Flatten representation of scalars in first-major order.
var isScalar: Bool { get }True if the shaped array is a rank-0 primitive value. For example, given a shaped array `m` of shape `[2, 2]`, `m[0, 1]` represents a scalar located at row 0 and column 1.
subscript(index: Int) -> MLShapedArraySlice<Self.Scalar> { get set }subscript(sliceRange: Range<Int>) -> MLShapedArraySlice<Self.Scalar> { get set }A slice of the shaped array for the specified ranges. This overrides the method from Collection.
subscript(_: (UnboundedRange_) -> Void) -> MLShapedArraySlice<Self.Scalar> { get set }22 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
MLShapedArrayProtocol.subscript(_:)
The iOS SDK compiler rejected this binding: cannot access associated type 'Scalar' from 'MLShapedArrayProtocol'; use a concrete type or generic parameter base instead
MLShapedArrayProtocol.subscript(_:)
A variable number of Swift arguments is not supported.
MLShapedArrayProtocol.subscript(_:)
The iOS SDK compiler rejected this binding: member 'subscript' cannot be used on value of type 'any MLShapedArrayProtocol'; consider using a generic constraint instead [#ExistentialMemberAccess]
MLShapedArrayProtocol.subscript(_:)
A variable number of Swift arguments is not supported.
MLShapedArrayProtocol.subscript(scalarAt:)
A variable number of Swift arguments is not supported.
MLShapedArrayProtocol.scalars
The iOS SDK compiler rejected this binding: cannot assign to property: 'o' is a 'let' constant
MLShapedArrayProtocol.scalar
The iOS SDK compiler rejected this binding: cannot assign to property: 'o' is a 'let' constant
MLShapedArrayProtocol.fill(with:)
The iOS SDK compiler rejected this binding: cannot access associated type 'Scalar' from 'MLShapedArrayProtocol'; use a concrete type or generic parameter base instead
MLShapedArrayProtocol.fill(with:)
This declaration needs Swift generic type arguments. (no canonical witness for C)
MLShapedArrayProtocol.index(after:)
The iOS SDK compiler rejected this binding: ambiguous type name 'Index' in 'MLShapedArrayProtocol'
MLShapedArrayProtocol.index(_:offsetBy:)
The iOS SDK compiler rejected this binding: ambiguous type name 'Index' in 'MLShapedArrayProtocol'
MLShapedArrayProtocol.init(identityMatrixOfSize:)
A protocol cannot be constructed directly.
MLShapedArrayProtocol.init(randomScalarsIn:shape:)
A protocol cannot be constructed directly.
MLShapedArrayProtocol.init(identityMatrixOfSize:)
A protocol cannot be constructed directly.
MLShapedArrayProtocol.init(randomScalarsIn:shape:)
A protocol cannot be constructed directly.
MLShapedArrayProtocol.init(arrayLiteral:)
A variable number of Swift arguments is not supported.
MLShapedArrayProtocol.init(repeating:shape:)
A protocol cannot be constructed directly.
MLShapedArrayProtocol.init(scalars:shape:)
This declaration needs Swift generic type arguments. (no canonical witness for S)
MLShapedArrayProtocol.init(bytesNoCopy:shape:deallocator:)
A protocol cannot be constructed directly.
MLShapedArrayProtocol.init(converting:)
A protocol cannot be constructed directly.
MLShapedArrayProtocol.init(_:)
A protocol cannot be constructed directly.
MLShapedArrayProtocol.init(converting:)
A protocol cannot be constructed directly.