fix output with newest numpy

This commit is contained in:
stefan committed 2025-10-22 14:17:44 +09:00
1 parent 674f3dea4a
commit 33addab141
4 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2020-2023 Stefan Holst Copyright (c) 2020-2025 Stefan Holst
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
+2 -2
View File
@@ -20,11 +20,11 @@ sys.path.insert(0, os.path.abspath('../src'))
# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------
project = 'KyuPy' project = 'KyuPy'
copyright = '2020-2023, Stefan Holst' copyright = '2020-2025, Stefan Holst'
author = 'Stefan Holst' author = 'Stefan Holst'
# The full version, including alpha/beta/rc tags # The full version, including alpha/beta/rc tags
release = '0.0.5' release = '0.0.6'
# -- General configuration --------------------------------------------------- # -- General configuration ---------------------------------------------------
+1 -1
View File
@@ -1,6 +1,6 @@
[project] [project]
name = "kyupy" name = "kyupy"
version = "0.0.5" version = "0.0.6"
authors = [ authors = [
{ name="Stefan Holst", email="mail@s-holst.de" }, { name="Stefan Holst", email="mail@s-holst.de" },
] ]
+1 -1
View File
@@ -114,7 +114,7 @@ def mvarray(*a):
def mv_str(mva, delim='\n'): def mv_str(mva, delim='\n'):
"""Renders a given multi-valued array into a string. """Renders a given multi-valued array into a string.
""" """
sa = np.choose(mva, np.array([*'0X-1PRFN'], dtype=np.unicode_)) sa = np.choose(mva, np.array([*'0X-1PRFN'], dtype=np.str_))
if not hasattr(mva, 'ndim') or mva.ndim == 0: return sa if not hasattr(mva, 'ndim') or mva.ndim == 0: return sa
if mva.ndim == 1: return ''.join(sa) if mva.ndim == 1: return ''.join(sa)
return delim.join([''.join(c) for c in sa.swapaxes(-1,-2)]) return delim.join([''.join(c) for c in sa.swapaxes(-1,-2)])