Skip to content

Reshape Array #2419

Open
Open
@CHIRAGGANDHI

Description

@CHIRAGGANDHI

Currently I am using diff function to get difference but like python diff function (np.diff(WWdx, axis=1, prepend=0, append=0), it doesn't have prepand and append parameter.

I have array defined as below,

xt::xarray a =
{
{0, 1, 2},
{4, 5, 6},
{8, 9, 10}
};

Now I would like to add an extra column with all the value 0. So it would look like below,

xt::xarray a =
{
{0, 1, 2, 0},
{4, 5, 6, 0},
{8, 9, 10, 0}
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions