Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions nolds/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
oct, open, pow, round, super, filter, map, zip
)
import numpy as np
import pkg_resources
import importlib.resources
import datetime


Expand Down Expand Up @@ -144,7 +144,7 @@ def load_qrandom():
the dataset
"""
fname = "datasets/qrandom.npy"
with pkg_resources.resource_stream(__name__, fname) as f:
with importlib.resources.open_binary(__name__, fname) as f:
return np.load(f)


Expand All @@ -159,7 +159,7 @@ def load_brown72():
the dataset
"""
fname = "datasets/brown72.npy"
with pkg_resources.resource_stream(__name__, fname) as f:
with importlib.resources.open_binary(__name__, fname) as f:
return np.load(f)


Expand All @@ -185,10 +185,10 @@ def load_lorenz_physionet():
x- and y-coordinates of the line fitting step in the PhysioNet output
"""
fname = "datasets/lorenz.txt"
with pkg_resources.resource_stream(__name__, fname) as f:
with importlib.resources.open_binary(__name__, fname) as f:
data_in = np.loadtxt(f)
fname = "datasets/lorenz_physionet.txt"
with pkg_resources.resource_stream(__name__, fname) as f:
with importlib.resources.open_binary(__name__, fname) as f:
data_out = np.loadtxt(f)
return data_in, data_out

Expand Down Expand Up @@ -393,7 +393,7 @@ def pad_opening_values(values):
data = []
for index in ["^JKSE", "^N225", "^NDX"]:
fname = "datasets/{}.csv".format(index)
with pkg_resources.resource_stream(__name__, fname) as f:
with importlib.resources.open_binary(__name__, fname) as f:
days, values = load_finance_yahoo_data(f)
pad_opening_values(values)
data.append((days, values))
Expand Down
42 changes: 42 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# pyproject.toml

[build-system]
requires = ["setuptools>=77.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "nolds"
version = "0.6.2"

authors = [
{ name="Christopher Schölzel", email="christopher.schoelzel@gmx.net" },
]
description = "Nonlinear measures for dynamical systems (based on one-dimensional time series)"
readme = "README.md"
requires-python = ">=3.10"
license = { file="LICENSE" }
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Visualization",
]

# Ana bağımlılıklarınız
dependencies = [
"numpy",
"matplotlib",
"setuptools",
"future",
]

[project.optional-dependencies]
test = ["pytest", "pytest-cov", "pytest-mock", "ruff", "numpy", "matplotlib", "scikit-learn", "quantumrandom",]

[tool.setuptools.packages.find]
where = ["."]

[project.urls]
Homepage = "https://github.com/CSchoel/nolds"
Repository = "https://github.com/CSchoel/nolds"