Skip to content

Commit

Permalink
Merge pull request #15 from jakirkham/use_np_113_print_style_doctests
Browse files Browse the repository at this point in the history
Use NumPy 1.13 legacy print mode in doctests
  • Loading branch information
jakirkham committed Nov 8, 2018
2 parents 0e379d7 + 6acd1be commit 037b820
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion environment_ci.yml
Expand Up @@ -8,4 +8,4 @@ dependencies:
- wheel==0.29.0
- coverage==3.7.1
- python-coveralls==2.5.0
- numpy==1.12.0
- numpy==1.15.4
3 changes: 3 additions & 0 deletions npctypes/shared.py
Expand Up @@ -111,6 +111,9 @@ def as_ndarray(a, writeable=True):
shared process heap.
Examples:
>>> numpy.set_printoptions(legacy="1.13")
>>> a = ndarray((2,3), float)
>>> with as_ndarray(a) as nd_a:
... nd_a[...] = 0
Expand Down
2 changes: 2 additions & 0 deletions npctypes/types.py
Expand Up @@ -83,6 +83,7 @@ def get_ndpointer_type(a):
(PyCSimpleType): the pointer type associated with this array.
Examples:
>>> a = numpy.zeros((3, 4), dtype=float)
>>> a_ptr = get_ndpointer_type(a)
Expand All @@ -103,6 +104,7 @@ def get_ndpointer_type(a):
OWNDATA : True
WRITEABLE : False
ALIGNED : True
WRITEBACKIFCOPY : False
UPDATEIFCOPY : False
"""

Expand Down

0 comments on commit 037b820

Please sign in to comment.