compressed-lists 0.4.2__tar.gz → 0.4.3__tar.gz
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.
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/CHANGELOG.md +1 -1
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/PKG-INFO +1 -1
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/src/compressed_lists/base.py +25 -9
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/src/compressed_lists.egg-info/PKG-INFO +1 -1
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/.coveragerc +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/.github/workflows/publish-pypi.yml +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/.github/workflows/run-tests.yml +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/.gitignore +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/.pre-commit-config.yaml +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/.readthedocs.yml +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/AUTHORS.md +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/CONTRIBUTING.md +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/LICENSE.txt +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/README.md +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/docs/Makefile +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/docs/_static/.gitignore +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/docs/authors.md +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/docs/changelog.md +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/docs/conf.py +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/docs/contributing.md +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/docs/index.md +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/docs/license.md +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/docs/readme.md +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/docs/requirements.txt +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/docs/tutorial.md +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/pyproject.toml +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/setup.cfg +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/setup.py +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/src/compressed_lists/__init__.py +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/src/compressed_lists/biocframe_list.py +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/src/compressed_lists/bool_list.py +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/src/compressed_lists/float_list.py +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/src/compressed_lists/integer_list.py +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/src/compressed_lists/numpy_list.py +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/src/compressed_lists/partition.py +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/src/compressed_lists/split_generic.py +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/src/compressed_lists/string_list.py +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/src/compressed_lists.egg-info/SOURCES.txt +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/src/compressed_lists.egg-info/dependency_links.txt +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/src/compressed_lists.egg-info/not-zip-safe +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/src/compressed_lists.egg-info/requires.txt +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/src/compressed_lists.egg-info/top_level.txt +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/tests/conftest.py +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/tests/test_base.py +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/tests/test_comp_biocframe.py +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/tests/test_comp_bool.py +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/tests/test_comp_custom.py +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/tests/test_comp_float.py +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/tests/test_comp_int.py +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/tests/test_comp_numpy.py +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/tests/test_comp_str.py +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/tests/test_generics.py +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/tests/test_partitioning.py +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/tests/test_type_validations.py +0 -0
- {compressed_lists-0.4.2 → compressed_lists-0.4.3}/tox.ini +0 -0
|
@@ -378,7 +378,10 @@ class CompressedList(ut.BiocObject):
|
|
|
378
378
|
return self.extract_range(start, end)
|
|
379
379
|
|
|
380
380
|
# slices
|
|
381
|
-
elif isinstance(key, slice):
|
|
381
|
+
elif isinstance(key, (range, slice)):
|
|
382
|
+
if isinstance(key, range):
|
|
383
|
+
key = slice(key.start, key.stop, key.step)
|
|
384
|
+
|
|
382
385
|
indices = range(*key.indices(len(self)))
|
|
383
386
|
result = []
|
|
384
387
|
for i in indices:
|
|
@@ -531,6 +534,10 @@ class CompressedList(ut.BiocObject):
|
|
|
531
534
|
Returns:
|
|
532
535
|
A new CompressedList with only the selected elements.
|
|
533
536
|
"""
|
|
537
|
+
print("here", indices, type(indices))
|
|
538
|
+
if isinstance(indices, np.ndarray):
|
|
539
|
+
indices = indices.tolist()
|
|
540
|
+
|
|
534
541
|
# Validate indices
|
|
535
542
|
for i in indices:
|
|
536
543
|
if i < 0 or i >= len(self):
|
|
@@ -544,16 +551,25 @@ class CompressedList(ut.BiocObject):
|
|
|
544
551
|
new_partitioning = Partitioning.from_lengths(new_lengths, new_names)
|
|
545
552
|
|
|
546
553
|
# Extract data
|
|
547
|
-
|
|
554
|
+
_new_data = []
|
|
548
555
|
for i in indices:
|
|
549
556
|
start, end = self._partitioning.get_partition_range(i)
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
+
_subset = ut.subset_sequence(self._unlist_data, [j for j in range(start, end)])
|
|
558
|
+
_new_data.append(_subset)
|
|
559
|
+
# if isinstance(self._unlist_data, np.ndarray):
|
|
560
|
+
# new_data.append(self._unlist_data[start:end])
|
|
561
|
+
# else:
|
|
562
|
+
# new_data.extend(self._unlist_data[start:end])
|
|
563
|
+
|
|
564
|
+
# if isinstance(self._unlist_data, np.ndarray):
|
|
565
|
+
# new_data = np.concatenate(new_data)
|
|
566
|
+
|
|
567
|
+
if len(_new_data) == 1:
|
|
568
|
+
new_data = _new_data[0]
|
|
569
|
+
elif len(_new_data) > 0:
|
|
570
|
+
new_data = ut.combine_sequences(*_new_data)
|
|
571
|
+
else:
|
|
572
|
+
new_data = []
|
|
557
573
|
|
|
558
574
|
current_class_const = type(self)
|
|
559
575
|
return current_class_const(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{compressed_lists-0.4.2 → compressed_lists-0.4.3}/src/compressed_lists.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{compressed_lists-0.4.2 → compressed_lists-0.4.3}/src/compressed_lists.egg-info/not-zip-safe
RENAMED
|
File without changes
|
{compressed_lists-0.4.2 → compressed_lists-0.4.3}/src/compressed_lists.egg-info/requires.txt
RENAMED
|
File without changes
|
{compressed_lists-0.4.2 → compressed_lists-0.4.3}/src/compressed_lists.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|