Skip to content

Returning vector, If 3> dimensions are 1 in zeros, etc #7

Description

@aminya

For array generation functions, If all of the dimensions that are supplied are 1, the resulting array should be a scalar.

Different tasks of this to do plan:

Achievement check:

we can get a :mat argument to do this, so this prevents type stability problems

onesM(:mat, 1, 2, 1, 1) # gives ones(1,2)
onesM(:mat, 2, 1, 1, 1) # gives ones(2,1)

isvectorM(:mat, ones(1,2,1,1)) # true
isvectorM(:mat, ones(1,1,2,1)) # false

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions