Base.view

Base.view(pointStart=None, pointEnd=None, featureStart=None, featureEnd=None)

Read-only access into the object data.

Factory function to create a read only view into the calling data object. Views may only be constructed from contiguous, in-order points and features whose overlap defines a window into the data. The returned View object is part of nimble’s datatypes hiearchy, and will have access to all of the same methods as anything that inherits from Base; though only those that do not modify the data can be called without an exception being raised. The returned view will also reflect any subsequent changes made to the original object. This is the only accepted method for a user to construct a View object (it should never be done directly), though view objects may be provided to the user, for example via user defined functions passed to points.extract or features.calculate.

Parameters:
  • pointStart (int) – The inclusive index of the first point to be accessible in the returned view. Is None by default, meaning to include from the beginning of the object.

  • pointEnd (int) – The inclusive index of the last point to be accessible in the returned view. Is None by default, meaning to include up to the end of the object.

  • featureStart (int) – The inclusive index of the first feature to be accessible in the returned view. Is None by default, meaning to include from the beginning of the object.

  • featureEnd (int) – The inclusive index of the last feature to be accessible in the returned view. Is None by default, meaning to include up to the end of the object.

Returns:

nimble view object – A nimble Base object with read-only access.

Keywords: read only, locked, immutable, unchangeable, uneditable