Skip to content

Add a strict option to itertools.batched() #113202

Closed
@rhettinger

Description

@rhettinger

This is modeled on the strict option for zip().

One use case is improving the reshape() recipe. In numpy, a reshape will raise an exception if the new dimensions do not exactly fit the data.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions