Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

StridedArray should be an abstract class, not a union #2345

Closed
Labels
needs decisionA decision on this change is needed
Milestone
@stevengj

Description

@stevengj

Currently, Julia defines

typealias StridedArray{T,N,A<:Array}  Union(Array{T,N}, SubArray{T,N,A})

It seems like it would be better to define

abstract StridedArray{T,N} <: AbstractArray{T,N}

and haveArray andSubArray both inherit fromStridedArray.

The reason is that I would like to define a newStridedArray type (wrapping a NumPyndarray). There is no reason, as far as I can tell, that I can't provide all the functionality of aSubArray and be used everywhere the latter is usable, but currently it does not seem possible to do this. Changing toabstract StridedArray would fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs decisionA decision on this change is needed

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp