From e8e6ed6671b3e1838f04f9eaa576360df8b30b77 Mon Sep 17 00:00:00 2001 From: Daniel McDonald Date: Tue, 7 May 2024 08:56:24 -0700 Subject: [PATCH] Issue 956 (#962) * MAINT/DEP: minor adjustment on formatting to support numpy 2.0 * DOC: mention of NumPy 2.0 support --- ChangeLog.md | 4 ++++ biom/table.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 24fa1f4e..6c8e1d4d 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -4,6 +4,10 @@ BIOM-Format ChangeLog biom 2.1.15-dev --------------- +New features: + +* NumPy 2.0 support, see issue [#956](https://github.com/biocore/biom-format/issues/956) + Bug Fixes: * Fixed an edge case on in `align_tree` when a feature was empty, see issue [#948](https://github.com/biocore/biom-format/issues/948) diff --git a/biom/table.py b/biom/table.py index 7e395bc3..0b6b32a0 100644 --- a/biom/table.py +++ b/biom/table.py @@ -4866,7 +4866,7 @@ def to_json(self, generated_by, direct_io=None, creation_date=None): for col_index, val in enumerate(obs[0]): if float(val) != 0.0: built_row.append( - "[%d,%d,%r]" % (obs_index, col_index, val) + "[%d,%d,%f]" % (obs_index, col_index, val) ) if built_row: # if we have written a row already, its safe to add a comma