Skip to content

Commit

Permalink
pygmt.filter1d: Fix the bug that the first line is read as headers (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman authored Oct 31, 2023
1 parent 8f1d476 commit c42def1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pygmt/src/filter1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def filter1d(data, output_type="pandas", outfile=None, **kwargs):

# Read temporary csv output to a pandas table
if outfile == tmpfile.name: # if user did not set outfile, return pd.DataFrame
result = pd.read_csv(tmpfile.name, sep="\t", comment=">")
result = pd.read_csv(tmpfile.name, sep="\t", header=None, comment=">")
elif outfile != tmpfile.name: # return None if outfile set, output in outfile
result = None

Expand Down
2 changes: 1 addition & 1 deletion pygmt/tests/test_filter1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_filter1d_no_outfile(data):
Test filter1d with no set outgrid.
"""
result = filter1d(data=data, filter_type="g5")
assert result.shape == (670, 2)
assert result.shape == (671, 2)


def test_filter1d_file_output(data):
Expand Down

0 comments on commit c42def1

Please sign in to comment.