ArrayWithShape

public struct ArrayWithShape<Element> : Equatable, Sequence, ShapeData where Element : Equatable
extension ArrayWithShape: FloatData where Element == Float
extension ArrayWithShape: Int32Data where Element == Int32
extension ArrayWithShape: UInt32Data where Element == UInt32

Undocumented

  • Undocumented

    Declaration

    Swift

    public var array: [Element]
  • Undocumented

    Declaration

    Swift

    public var shape: Shape
  • Undocumented

    Declaration

    Swift

    public var count: Int { get }
  • Undocumented

    Declaration

    Swift

    public init(_ array: [Element], shape: Shape)
  • Declaration

    Swift

    public func dataShape() throws -> Shape
  • Undocumented

    Declaration

    Swift

    public subscript(index: Int) -> Element { get set }
  • Declaration

    Swift

    public static func == (lhs: `Self`, rhs: `Self`) -> Bool
  • Undocumented

    Declaration

    Swift

    public static func == (lhs: [Element], rhs: `Self`) -> Bool
  • Undocumented

    Declaration

    Swift

    public static func == (lhs: `Self`, rhs: [Element]) -> Bool
  • Declaration

    Swift

    public func makeIterator() -> ArrayWithShapeIterator<Element>

Available where Element == Float

  • Declaration

    Swift

    public func data() throws -> [Float]

    Return Value

    [Float]

Available where Element == Int32

  • Declaration

    Swift

    public func data() throws -> [Int32]

    Return Value

    [Int32]

Available where Element == UInt32

  • Declaration

    Swift

    public func data() throws -> [UInt32]

    Return Value

    [UInt32]

Available where Element: NumpyScalarCompatible

  • Precondition

    The numpy Python package must be installed.

    Declaration

    Swift

    func makeNumpyArray() -> PythonObject

    Return Value

    Properly shaped numpy array.