Skip to content

Commit

Permalink
Switch doctest to float array
Browse files Browse the repository at this point in the history
The problem with integers is that they are a different size on Windows
than on the other platforms. Floats are the same though.
  • Loading branch information
mwcraig committed Dec 3, 2023
1 parent b8e18ff commit bf930e5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions stellarphot/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,23 +344,23 @@ def clean(self, remove_rows_with_mask=False, **other_restrictions):
>>> from astropy.table import Table
>>> from stellarphot import BaseEnhancedTable # Any subclasses will work too
>>> t = Table([[1, 2, 3], [1, 2, 3]], names=('a', 'b'), masked=True)
>>> t = Table([[1.0, 2.0, 3.0], [1.0, 2.0, 3.0]], names=('a', 'b'), masked=True)
>>> bet = BaseEnhancedTable(t)
>>> bet['a'].mask = [True, False, False]
>>> bet['b'].mask = [False, False, True]
>>> bet.clean(remove_rows_with_mask=True)
<BaseEnhancedTable length=1>
a b
int64 int64
----- -----
2 2
a b
float64 float64
------- -------
2.0 2.0
>>> bet.clean(a='>2')
<BaseEnhancedTable length=1>
a b
int64 int64
----- -----
3 --
a b
float64 float64
------- -------
3.0 --
"""
comparisons = {
Expand Down
2 changes: 1 addition & 1 deletion stellarphot/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ def prepare_cat(cat):


def test_from_vizier_with_coord_and_frame_clip_fails():
# Check that calling catalog_search with a coordinate instead
# Check that calling from_vizier with a coordinate instead
# of WCS and with clip_by_frame = True generates an appropriate
# error.
data_file = 'data/sample_wcs_ey_uma.fits'
Expand Down

0 comments on commit bf930e5

Please sign in to comment.