Skip to content

TypeError: only integer scalar arrays can be converted to a scalar index #1

@GregKuhlmann

Description

@GregKuhlmann

Upon running python main.py I get the following error:

('Extracting', 'MNIST_data/train-images-idx3-ubyte.gz')
Traceback (most recent call last):
  File "main.py", line 44, in <module>
    mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
  File "/Users/kuhlmann/autoencoder_demo/input_data.py", line 150, in read_data_sets
    train_images = extract_images(local_file)
  File "/Users/kuhlmann/autoencoder_demo/input_data.py", line 40, in extract_images
    buf = bytestream.read(rows * cols * num_images)
  File "/usr/local/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gzip.py", line 275, in read
    chunk = self.extrabuf[offset: offset + size]
TypeError: only integer scalar arrays can be converted to a scalar index

Fixed by following advice here:
http://stackoverflow.com/questions/42128830/typeerror-only-integer-scalar-arrays-can-be-converted-to-a-scalar-index

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions