Skip to content

Slice a single element array using Numpy indexing #1

@khordoo

Description

@khordoo

This is not an issue per se. There is a more convenient and natural way of single-element array slicing in NumPy.

Instead of :
lr.predict(X_test_std[0, :].reshape(1, -1))
We can do :

lr.predict(X_test_std[:1, :])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions