<commit_before>
  >>> from shapely.geometry import Point

Test 2D points
--------------

  >>> p = Point(0.0, 0.0)
  >>> str(p)
  'POINT (0.0000000000000000 0.0000000000000000)'
  >>> p.wkt
  'POINT (0.0000000000000000 0.0000000000000000)'
    
Check 3D
--------

  >>> p = Point(0.0, 0.0, 1.0)
  >>> p.z
  1.0
  >>> str(p)
  'POINT (0.0000000000000000 0.0000000000000000 0.0000000000000000)'
  >>> p.wkt
  'POINT (0.0000000000000000 0.0000000000000000 0.0000000000000000)'

Construct from a numpy array
----------------------------

  >>> from numpy import array
  >>> p = Point(array([1.0, 2.0]))
  >>> p.wkt
  'POINT (1.0000000000000000 2.0000000000000000)'

From coordinate sequence
------------------------

  >>> p = Point((3.0, 4.0))
  >>> p.wkt
  'POINT (3.0000000000000000 4.0000000000000000)'


Coordinate access
-----------------

  >>> p.x
  3.0
  >>> p.y
  4.0
  >>> tuple(p.coords)
  ((3.0, 4.0),)
  >>> p.coords[0]
  (3.0, 4.0)

Geo interface
-------------

  >>> p.__geo_interface__
  {'type': 'Point', 'coordinates': (3.0, 4.0)}

Adapter
-------

  >>> from shapely.geometry import asPoint

  Adapt a Numpy array to a point

  >>> a = array([1.0, 2.0])
  >>> pa = asPoint(a)
  >>> pa.context
  array([ 1.,  2.])
  >>> pa.wkt
  'POINT (1.0000000000000000 2.0000000000000000)'

  Now, the inverse

  >>> pa.__array_interface__ == pa.context.__array_interface__
  True
  >>> from numpy import asarray
  >>> as = asarray(pa)
  >>> as
  array([ 1.,  2.])

  Adapt a coordinate list to a point

  >>> coords = [3.0, 4.0]
  >>> pa = asPoint(coords)
  >>> pa.wkt
  'POINT (3.0000000000000000 4.0000000000000000)'
  >>> coords[0] = 1.0
  >>> pa.wkt
  'POINT (1.0000000000000000 4.0000000000000000)'

  >>> pa.__array_interface__ # doctest: +ELLIPSIS
  {'shape': (2,), 'version': 3, 'data': <shapely.geometry.point.c_double_Array_2 object at ...>, 'typestr': '<f8'}

  Now, the inverse
  
  >>> as = asarray(pa)
  >>> as
  array([ 1.,  4.])
<commit_msg>Add another test of an operation after modifying the adapter context<commit_after>
  >>> from shapely.geometry import Point

Test 2D points
--------------

  >>> p = Point(0.0, 0.0)
  >>> str(p)
  'POINT (0.0000000000000000 0.0000000000000000)'
  >>> p.wkt
  'POINT (0.0000000000000000 0.0000000000000000)'
    
Check 3D
--------

  >>> p = Point(0.0, 0.0, 1.0)
  >>> p.z
  1.0
  >>> str(p)
  'POINT (0.0000000000000000 0.0000000000000000 0.0000000000000000)'
  >>> p.wkt
  'POINT (0.0000000000000000 0.0000000000000000 0.0000000000000000)'

Construct from a numpy array
----------------------------

  >>> from numpy import array
  >>> p = Point(array([1.0, 2.0]))
  >>> p.wkt
  'POINT (1.0000000000000000 2.0000000000000000)'

From coordinate sequence
------------------------

  >>> p = Point((3.0, 4.0))
  >>> p.wkt
  'POINT (3.0000000000000000 4.0000000000000000)'


Coordinate access
-----------------

  >>> p.x
  3.0
  >>> p.y
  4.0
  >>> tuple(p.coords)
  ((3.0, 4.0),)
  >>> p.coords[0]
  (3.0, 4.0)

Geo interface
-------------

  >>> p.__geo_interface__
  {'type': 'Point', 'coordinates': (3.0, 4.0)}

Adapter
-------

  >>> from shapely.geometry import asPoint

  Adapt a Numpy array to a point

  >>> a = array([1.0, 2.0])
  >>> pa = asPoint(a)
  >>> pa.context
  array([ 1.,  2.])
  >>> pa.wkt
  'POINT (1.0000000000000000 2.0000000000000000)'

  Now, the inverse

  >>> pa.__array_interface__ == pa.context.__array_interface__
  True
  >>> from numpy import asarray
  >>> as = asarray(pa)
  >>> as
  array([ 1.,  2.])

  Adapt a coordinate list to a point

  >>> coords = [3.0, 4.0]
  >>> pa = asPoint(coords)
  >>> pa.wkt
  'POINT (3.0000000000000000 4.0000000000000000)'
  >>> pa.distance(p)
  0.0
  
  Move the coordinates and watch the distance change

  >>> coords[0] = 1.0
  >>> pa.wkt
  'POINT (1.0000000000000000 4.0000000000000000)'
  >>> pa.distance(p)
  2.0

  >>> pa.__array_interface__ # doctest: +ELLIPSIS
  {'shape': (2,), 'version': 3, 'data': <shapely.geometry.point.c_double_Array_2 object at ...>, 'typestr': '<f8'}

  Now, the inverse
  
  >>> as = asarray(pa)
  >>> as
  array([ 1.,  4.])

{'fraction_non_alphanumeric': 0.22662750856583455, 'fraction_numerical': 0.19676945668135096, 'mean_word_length': 2.5081545064377684, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 221, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 40, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6838262', 'n_tokens_mistral': 2127, 'n_tokens_neox': 1438, 'n_words': 358}