From 1ff8577fec7c58b6ea6bb6e17a62baf1b932e544 Mon Sep 17 00:00:00 2001 From: Guillaume Viejo Date: Thu, 4 Apr 2024 18:01:31 -0400 Subject: [PATCH] Bumping 0.6.2 --- docs/HISTORY.md | 2 +- pynapple/__init__.py | 2 +- pynapple/core/interval_set.py | 45 +++++++++++++++++++---------------- pyproject.toml | 2 +- setup.py | 2 +- 5 files changed, 29 insertions(+), 24 deletions(-) diff --git a/docs/HISTORY.md b/docs/HISTORY.md index 02c53ef5..78b99f2d 100644 --- a/docs/HISTORY.md +++ b/docs/HISTORY.md @@ -9,7 +9,7 @@ In 2018, Francesco started neuroseries, a Python package built on Pandas. It was In 2021, Guillaume and other trainees in Adrien's lab decided to fork from neuroseries and started *pynapple*. The core of pynapple is largely built upon neuroseries. Some of the original changes to TSToolbox made by Luke were included in this package, especially the *time_support* property of all ts/tsd objects. -0.6.2 (Soon) +0.6.2 (2024-04-04) ------------------ - `smooth` now takes standard deviation in time units diff --git a/pynapple/__init__.py b/pynapple/__init__.py index 0855144a..df8fb09d 100644 --- a/pynapple/__init__.py +++ b/pynapple/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.6.1" +__version__ = "0.6.2" from .core import IntervalSet, Ts, Tsd, TsdFrame, TsdTensor, TsGroup, TsIndex, config from .io import * from .process import * diff --git a/pynapple/core/interval_set.py b/pynapple/core/interval_set.py index ca1046aa..b556cb52 100644 --- a/pynapple/core/interval_set.py +++ b/pynapple/core/interval_set.py @@ -5,32 +5,37 @@ You can still apply any numpy array function to it : - >>> import pynapple as nap - >>> import numpy as np - >>> ep = nap.IntervalSet(start=[0, 10], end=[5,20]) - start end - 0 0 5 - 1 10 20 - shape: (1, 2) - >>> np.diff(ep, 1) - UserWarning: Converting IntervalSet to numpy.array - array([[ 5.], - [10.]]) + ``` py + >>> import pynapple as nap + >>> import numpy as np + >>> ep = nap.IntervalSet(start=[0, 10], end=[5,20]) + start end + 0 0 5 + 1 10 20 + shape: (1, 2) + >>> np.diff(ep, 1) + UserWarning: Converting IntervalSet to numpy.array + array([[ 5.], + [10.]]) + ``` You can slice : - >>> ep[:,0] - array([ 0., 10.]) - >>> ep[0] - start end - 0 0 5 - shape: (1, 2) + ``` py + >>> ep[:,0] + array([ 0., 10.]) + >>> ep[0] + start end + 0 0 5 + shape: (1, 2) + ``` But modifying the `IntervalSet` with raise an error: - >>> ep[0,0] = 1 - RuntimeError: IntervalSet is immutable. Starts and ends have been already sorted. - + ``` py + >>> ep[0,0] = 1 + RuntimeError: IntervalSet is immutable. Starts and ends have been already sorted. + ``` """ diff --git a/pyproject.toml b/pyproject.toml index c0cb7ad6..79b39ae8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "pynapple" -version = "0.6.1" +version = "0.6.2" description = "PYthon Neural Analysis Package Pour Laboratoires d’Excellence" readme = "README.md" authors = [{ name = "Guillaume Viejo", email = "guillaume.viejo@gmail.com" }] diff --git a/setup.py b/setup.py index 16747f71..0cd94690 100644 --- a/setup.py +++ b/setup.py @@ -59,7 +59,7 @@ test_suite='tests', tests_require=test_requirements, url='https://github.com/pynapple-org/pynapple', - version='v0.6.1', + version='v0.6.2', zip_safe=False, long_description_content_type='text/markdown', download_url='https://github.com/pynapple-org/pynapple/archive/refs/tags/v0.6.0.tar.gz'