If you&#x27;ve got something simple like a binary file full of uints (e.g. a raw image), then numpy provides fromfile which is incredibly simple to use. If you have tabular data in a known format, you can also pass fairly complicated datatypes.<p>np.fromfile(&#x27;data.dat&#x27;, dtype=&#x27;uint8&#x27;)<p><a href="https:&#x2F;&#x2F;docs.scipy.org&#x2F;doc&#x2F;numpy&#x2F;reference&#x2F;generated&#x2F;numpy.fromfile.html" rel="nofollow">https:&#x2F;&#x2F;docs.scipy.org&#x2F;doc&#x2F;numpy&#x2F;reference&#x2F;generated&#x2F;numpy.f...</a><p>EDIT: Obviously you have the added benefit that your data is returned into a numpy array for easy reshaping etc