Skip to content

Commit c060b93

Browse files
committed
vstack
url formating doctest numpy2 float64 issue
1 parent 4f6bf52 commit c060b93

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
}
8484

8585
extlinks = {'sfs': ('https://sfs.readthedocs.io/en/3.2/%s',
86-
'https://sfs.rtfd.io/')}
86+
'https://sfs.rtfd.io/%s')}
8787

8888
plot_include_source = True
8989
plot_html_show_source_link = False

sfs/array.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -664,15 +664,15 @@ def weights_midpoint(positions, *, closed):
664664
>>> x0, n0, a0 = sfs.array.circular(2**5, 1)
665665
>>> a = sfs.array.weights_midpoint(x0, closed=True)
666666
>>> max(abs(a0-a))
667-
0.0003152601902411123
667+
np.float64(0.0003152601902411123)
668668
669669
"""
670670
positions = _util.asarray_of_rows(positions)
671671
if closed:
672672
before, after = -1, 0 # cyclic
673673
else:
674674
before, after = 1, -2 # mirrored
675-
positions = _np.row_stack((positions[before], positions, positions[after]))
675+
positions = _np.vstack((positions[before], positions, positions[after]))
676676
distances = _np.linalg.norm(_np.diff(positions, axis=0), axis=1)
677677
return (distances[:-1] + distances[1:]) / 2
678678

0 commit comments

Comments
 (0)