Skip to content

Instantly share code, notes, and snippets.

View dehorsley's full-sized avatar

David Horsley dehorsley

View GitHub Profile
@stuarteberg
stuarteberg / gist:7ecd8cb7b24d12f4ffd9
Last active January 19, 2023 04:34
simpleview.py
# License: public domain
class SimpleView(object):
"""
Simple view-like object of an array-like object.
Slices taken with __getitem__ are combined and stored for later use,
but the actual data is not extracted from the underlying array-like
object until __array__ is called.
Warnings about the current implementation: