Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistency in Rows/Columns/1d-arrays #90

Closed
odunbar opened this issue Dec 8, 2020 · 0 comments · Fixed by #102
Closed

Consistency in Rows/Columns/1d-arrays #90

odunbar opened this issue Dec 8, 2020 · 0 comments · Fixed by #102

Comments

@odunbar
Copy link
Collaborator

odunbar commented Dec 8, 2020

It seems like in general when we have tasks requiring linear algebra operations on arrays, it is good practice to ensure that we have a defined dimensionality of the arrays. I would recommend we always use 2D arrays (columns or rows) over 1D vector-type arrays if we are going to use them for linear algebra. Typically these arising from a 'vanishing dimension' of a normally clear 2D array.

E.g when dealing with ensemble based methods, we perhaps wish for arrays to be [ensemble size x parameter dimension] but if we have parameter dimension of 1 then often one defaults to a 1D-array, from which the ambiguity of "which dimension vanished?" arises. This is cured by specifying 2D inputs of [ensemble size x 1] or a [1 x parameter dimension].

The overhead then to pick the dimensions consistently throughout CES to avoid multiple transpositions as we pass through different objects or functions.

note to self, Julia encourages the use of permutedims(A,(2,1)) over A' for applying a transposition otherwise one changes the type into an Adjoint LinearAlgebra object.

@bors bors bot closed this as completed in 468f5a2 Feb 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant