# tf.data.NumpyIterator

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.14.0/tensorflow/python/data/ops/dataset_ops.py#L4669-L4721) |

Iterator over a dataset with elements converted to numpy.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.data.NumpyIterator`](https://www.tensorflow.org/api_docs/python/tf/data/NumpyIterator)

<br />

    tf.data.NumpyIterator(
        dataset
    )

## Methods

### `next`

[View source](https://github.com/tensorflow/tensorflow/blob/v2.14.0/tensorflow/python/data/ops/dataset_ops.py#L4693-L4694)

    next()

### `restore`

[View source](https://github.com/tensorflow/tensorflow/blob/v2.14.0/tensorflow/python/data/ops/dataset_ops.py#L4719-L4721)

    restore(
        state
    )

### `save`

[View source](https://github.com/tensorflow/tensorflow/blob/v2.14.0/tensorflow/python/data/ops/dataset_ops.py#L4711-L4713)

    save()

### `__iter__`

[View source](https://github.com/tensorflow/tensorflow/blob/v2.14.0/tensorflow/python/data/ops/dataset_ops.py#L4678-L4679)

    __iter__()