Skip to content

Add numpy example for assigning to a slice #1209

Description

@dstansby

To assign values to a slice of a numpy array it's possible to do e.g.:

import numpy as np
a = np.zeros((2, 2))
a[:, 0] = 1

It would be good to add how to do this in ndarray to the ndarray for numpy users docs

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

    Labels

    docsIssues relating primarily to documentation or API visibility.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions