modusa 0.2.1__py3-none-any.whl → 0.2.21__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
modusa/io/audio_loader.py CHANGED
@@ -72,7 +72,7 @@ class AudioLoader(ModusaIO):
72
72
  # Load the audio in memory and return that
73
73
  audio_data, audio_sr = librosa.load(wav_audio_fp, sr=sr)
74
74
 
75
- audio = AudioSignal(y=audio_data, sr=sr, title=audio_fp.stem)
75
+ audio = AudioSignal(y=audio_data, sr=audio_sr, title=audio_fp.stem)
76
76
 
77
77
  return audio
78
78
 
@@ -106,6 +106,8 @@ class AudioLoader(ModusaIO):
106
106
 
107
107
  """
108
108
  import librosa
109
+ import warnings
110
+ warnings.filterwarnings("ignore", message="pkg_resources is deprecated as an API.")
109
111
 
110
112
  fp = Path(fp)
111
113
  y, sr = librosa.load(fp, sr=sr)
@@ -313,7 +313,14 @@ class AudioSignal(ModusaSignal):
313
313
  #----------------------------
314
314
 
315
315
  def __array__(self, dtype=None):
316
- return np.asarray(self._S, dtype=dtype)
316
+ return np.asarray(self.y, dtype=dtype)
317
+
318
+ def __array_ufunc__(self, ufunc, method, *inputs, **kwargs):
319
+ if ufunc == np.abs and method == "__call__":
320
+ # Extract the actual array from self or others
321
+ result = ufunc(self.y, **kwargs)
322
+ return self.__class__(y=result, sr=self.sr, title=f"{self.title} (abs)")
323
+ return NotImplemented
317
324
 
318
325
  def __add__(self, other):
319
326
  other_data = other.y if isinstance(other, self.__class__) else other
@@ -1,32 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: modusa
3
- Version: 0.2.1
3
+ Version: 0.2.21
4
4
  Summary: A modular signal analysis python library.
5
5
  Author-Email: Ankit Anand <ankit0.anand0@gmail.com>
6
6
  License: MIT
7
7
  Requires-Python: >=3.12
8
- Requires-Dist: jupyter>=1.1.1
9
- Requires-Dist: pytest>=8.4.0
10
8
  Requires-Dist: numpy>=2.2.6
11
9
  Requires-Dist: matplotlib>=3.10.3
12
- Requires-Dist: pandas>=2.3.0
13
- Requires-Dist: pydantic>=2.11.5
14
- Requires-Dist: sqlalchemy>=2.0.41
15
- Requires-Dist: tqdm>=4.67.1
16
- Requires-Dist: sphinx==8.1.2
17
- Requires-Dist: sphinx-autodoc-typehints==2.1.0
18
- Requires-Dist: sphinx-copybutton>=0.5.2
19
- Requires-Dist: furo>=2024.8.6
20
- Requires-Dist: questionary>=2.1.0
21
- Requires-Dist: rich>=14.0.0
22
- Requires-Dist: snakeviz>=2.2.2
23
- Requires-Dist: line-profiler>=4.2.0
24
- Requires-Dist: nbsphinx==0.9.7
25
- Requires-Dist: ghp-import>=2.1.0
26
10
  Requires-Dist: yt-dlp>=2025.6.30
27
- Requires-Dist: sphinx-book-theme>=1.1.4
28
- Requires-Dist: pydata-sphinx-theme>=0.15.4
29
- Requires-Dist: sphinx-material>=0.0.36
30
11
  Requires-Dist: librosa==0.10.1
31
12
  Description-Content-Type: text/markdown
32
13
 
@@ -1,7 +1,7 @@
1
- modusa-0.2.1.dist-info/METADATA,sha256=4cK0_yx8eYQBS5vkOmKV-qM7n5dhlJUoDj4cDqmAj_Y,2117
2
- modusa-0.2.1.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
3
- modusa-0.2.1.dist-info/entry_points.txt,sha256=fmKpleVXj6CdaBVL14WoEy6xx7JQCs85jvzwTi3lePM,73
4
- modusa-0.2.1.dist-info/licenses/LICENSE.md,sha256=JTaXAjx5awk76VArKCx5dUW8vmLEWsL_ZlR7-umaHbA,1078
1
+ modusa-0.2.21.dist-info/METADATA,sha256=8w92QC0HD1G1ffEuooI1tR_EMDkB0aGTjqmngzKvki4,1475
2
+ modusa-0.2.21.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
3
+ modusa-0.2.21.dist-info/entry_points.txt,sha256=fmKpleVXj6CdaBVL14WoEy6xx7JQCs85jvzwTi3lePM,73
4
+ modusa-0.2.21.dist-info/licenses/LICENSE.md,sha256=JTaXAjx5awk76VArKCx5dUW8vmLEWsL_ZlR7-umaHbA,1078
5
5
  modusa/.DS_Store,sha256=Q0eG2RQNYtV4qa5BYj_GznvlEBpNdebi6ZTIR-a7AhU,6148
6
6
  modusa/__init__.py,sha256=bfQKVSpAXlKmKvMRIU6WSRQW2qoJsaZsdNJ8E69ghn0,37
7
7
  modusa/config.py,sha256=bTqK4t00FZqERVITrxW_q284aDDJAa9aMSfFknfR-oU,280
@@ -24,7 +24,7 @@ modusa/generators/audio_waveforms.py,sha256=qWg9TUVux8Abxmxa7EjCB_Pt88UFC6bJBqvY
24
24
  modusa/generators/base.py,sha256=QTb-8F19DmoCwLS7Mn9MdugOMZ_22suuTBFrmpyE7LM,934
25
25
  modusa/io/__init__.py,sha256=2Jg44klIAjbgLCn4faXXug_4nW-UiMsOH4Z3g0VGxWw,250
26
26
  modusa/io/audio_converter.py,sha256=CjsuvdjpHAuwJFjFNCHSzge-i07zW6U-cnb0EIYhMC0,1877
27
- modusa/io/audio_loader.py,sha256=G2q7wVDGtjWzZ_mlsu2uv5C4TnJynpuqMyBeVLDlw_o,4793
27
+ modusa/io/audio_loader.py,sha256=o_tAFZaGVm62z59Yinzf2z6Gp_lujRoSWk1GHCaeOlI,4903
28
28
  modusa/io/audio_player.py,sha256=5BrYx1YyTYUybroJSNaZ5n7ABgKWeP4zBCLfhyQYPBE,1626
29
29
  modusa/io/base.py,sha256=GOMvpicWWLWXoxm4nLwqq_0hWmXWzYAPLVx-CbthCsQ,1291
30
30
  modusa/io/plotter.py,sha256=VViXHuIugAQDcTkSWjbrymrMrQOKVw97jqsd4-kWl_8,11920
@@ -33,7 +33,7 @@ modusa/main.py,sha256=YeNg_GX3pzP4qNNU7CItCkWt5eOCHhnWLENFcQFlgfc,538
33
33
  modusa/plugins/__init__.py,sha256=OB-b_GnUnTkECn1fwxl844UBmiui3mSWIvhBqMZY7Tc,22
34
34
  modusa/plugins/base.py,sha256=Bh_1Bja7fOymFsCgwhXDbV6ys3D8muNrPwrfDrG_G_A,2382
35
35
  modusa/signals/__init__.py,sha256=TZujCd50gGnO-r27Tv6hrzNl8zBsMIMFwYCeIwszMjc,237
36
- modusa/signals/audio_signal.py,sha256=WzlMcxWGk3a9X2qkaQFjh3smoUJqkko_8C7WVtYOtnQ,15454
36
+ modusa/signals/audio_signal.py,sha256=DvjQUjja9s3nrAHM7H_3z5DVC0nha0Az2D1025q5upk,15750
37
37
  modusa/signals/base.py,sha256=UdwOTlIHvXjpuCBwE-IcCQBL0F-wuhQpD6aOvI8FvXE,795
38
38
  modusa/signals/frequency_domain_signal.py,sha256=wS7MN6y56BDInNgtnkIB3XNsxDS_TNmewqS-A31MJmY,11192
39
39
  modusa/signals/signal_ops.py,sha256=tpbZs10NVkT4Y7nsIhqGEP4Y6T8JZ07PiKxF34fYu-I,4685
@@ -44,4 +44,4 @@ modusa/utils/__init__.py,sha256=1oLL20yLB1GL9IbFiZD8OReDqiCpFr-yetIR6x1cNkI,23
44
44
  modusa/utils/config.py,sha256=cuGbqbovx5WDQq5rw3hIKcv3CnE5NttjacSOWnP1yu4,576
45
45
  modusa/utils/excp.py,sha256=_NLfR1AKU4dOpK-OF0NaChYjaVBCcq1VmSd_dkOexi4,1235
46
46
  modusa/utils/logger.py,sha256=K0rsnObeNKCxlNeSnVnJeRhgfmob6riB2uyU7h3dDmA,571
47
- modusa-0.2.1.dist-info/RECORD,,
47
+ modusa-0.2.21.dist-info/RECORD,,