Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.5%) to scientific vocabulary
Keywords
data-structure
library
multiset
python
Keywords from Contributors
serializer
smooth
embedded
graph-generation
mesh
distributed
action
yolov5s
xunit-framework
cryptocurrencies
Last synced: 6 months ago
·
JSON representation
Repository
A multiset implementation for python
Basic Info
- Host: GitHub
- Owner: wheerd
- License: mit
- Language: Python
- Default Branch: master
- Size: 132 KB
Statistics
- Stars: 39
- Watchers: 1
- Forks: 10
- Open Issues: 8
- Releases: 9
Topics
data-structure
library
multiset
python
Created over 9 years ago
· Last pushed over 1 year ago
Metadata Files
Readme
License
README.rst
multiset
========
This package provides a multiset_ implementation for python.
|pypi| |coverage| |build| |docs|
Overview
--------
A multiset is similar to the builtin set_, but it allows an element to occur multiple times.
It is an unordered collection of elements which have to be hashable just like in a set_.
It supports the same methods and operations as set_ does, e.g. membership test, union, intersection, and
(symmetric) difference::
>>> set1 = Multiset('aab')
>>> set2 = Multiset('abc')
>>> sorted(set1 | set2)
['a', 'a', 'b', 'c']
Multisets can be used in combination with sets_::
>>> Multiset('aab') >= {'a', 'b'}
True
Multisets are mutable::
>>> set1.update('bc')
>>> sorted(set1)
['a', 'a', 'b', 'b', 'c']
There is an immutable version similar to the frozenset_ which is also hashable::
>>> set1 = FrozenMultiset('abc')
>>> set2 = FrozenMultiset('abc')
>>> hash(set1) == hash(set2)
True
>>> set1 is set2
False
The implementation is based on a dict_ that maps the elements to their multiplicity in the multiset.
Hence, some dictionary operations are supported.
In contrast to the `collections.Counter`_ from the standard library, it has proper support for set
operations and only allows positive counts. Also, elements with a zero multiplicity are automatically
removed from the multiset.
Installation
------------
Installing `multiset` is simple with `pip `_::
$ pip install multiset
Documentation
-------------
The documentation is available at `Read the Docs`_.
.. _`Read the Docs`: http://multiset.readthedocs.io/
API Documentation
.................
If you are looking for information on a particular method of the Multiset class, have a look at the
`API Documentation`_. It is automatically generated from the docstrings.
.. _`API Documentation`: http://multiset.readthedocs.io/en/latest/api.html
License
-------
Licensed under the MIT_ license.
.. _multiset: https://en.wikipedia.org/wiki/Multiset
.. _set: https://docs.python.org/3.10/library/stdtypes.html#set-types-set-frozenset
.. _sets: set_
.. _frozenset: set_
.. _dict: https://docs.python.org/3.10/library/stdtypes.html#mapping-types-dict
.. _`collections.Counter`: https://docs.python.org/3.10/library/collections.html#collections.Counter
.. _MIT: https://opensource.org/licenses/MIT
.. |pypi| image:: https://img.shields.io/pypi/v/multiset.svg?style=flat-square&label=latest%20stable%20version
:target: https://pypi.python.org/pypi/multiset
:alt: Latest version released on PyPi
.. |coverage| image:: https://coveralls.io/repos/github/wheerd/multiset/badge.svg?branch=master
:target: https://coveralls.io/github/wheerd/multiset?branch=master
:alt: Test coverage
.. |build| image:: https://github.com/wheerd/multiset/workflows/Tests/badge.svg?branch=master
:target: https://github.com/wheerd/multiset/actions?query=workflow%3ATests
:alt: Build status of the master branch
.. |docs| image:: https://readthedocs.org/projects/multiset/badge/?version=latest
:target: http://multiset.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
Owner
- Name: Manuel Krebber
- Login: wheerd
- Kind: user
- Location: Hamburg
- Company: Netlight
- Website: http://wheerd.de/
- Repositories: 5
- Profile: https://github.com/wheerd
GitHub Events
Total
- Watch event: 2
Last Year
- Watch event: 2
Committers
Last synced: 12 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Manuel Krebber | a****n@w****e | 76 |
| dependabot[bot] | 4****] | 13 |
| dependabot-preview[bot] | 2****] | 8 |
| ldeluigi | 4****i | 2 |
| Manuel Krebber | m****r@g****u | 2 |
| Thomas David Baker | b****t@g****m | 1 |
| Theodore Ni | 3****i | 1 |
| Razi96 | 9****6 | 1 |
| Michael Hay | m****o@h****k | 1 |
| Lonnen | l****n | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 5
- Total pull requests: 125
- Average time to close issues: 5 months
- Average time to close pull requests: about 2 months
- Total issue authors: 5
- Total pull request authors: 8
- Average comments per issue: 1.8
- Average comments per pull request: 1.1
- Merged pull requests: 32
- Bot issues: 0
- Bot pull requests: 111
Past Year
- Issues: 1
- Pull requests: 7
- Average time to close issues: about 2 months
- Average time to close pull requests: 17 days
- Issue authors: 1
- Pull request authors: 2
- Average comments per issue: 2.0
- Average comments per pull request: 0.71
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 5
Top Authors
Issue Authors
- bigfatcat-shiquan (1)
- MikeFHay (1)
- eroller (1)
- ldeluigi (1)
- odioidentisti2 (1)
Pull Request Authors
- dependabot[bot] (111)
- dependabot-preview[bot] (16)
- wheerd (10)
- ldeluigi (4)
- bakert (2)
- Razi96 (1)
- MikeFHay (1)
- tjni (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (127)
python (4)
github_actions (4)
Packages
- Total packages: 2
-
Total downloads:
- pypi 78,534 last-month
- Total docker downloads: 356
-
Total dependent packages: 8
(may contain duplicates) -
Total dependent repositories: 33
(may contain duplicates) - Total versions: 14
- Total maintainers: 1
pypi.org: multiset
An implementation of a multiset.
- Homepage: https://github.com/wheerd/multiset
- Documentation: https://multiset.readthedocs.io/
- License: MIT
-
Latest release: 3.2.0
published over 1 year ago
Rankings
Dependent packages count: 1.6%
Downloads: 1.6%
Docker downloads count: 2.5%
Dependent repos count: 2.6%
Average: 5.2%
Stargazers count: 10.9%
Forks count: 11.9%
Maintainers (1)
Last synced:
6 months ago
conda-forge.org: multiset
A multiset is similar to the builtin set, but it allows an element to occur multiple times. It is an unordered collection of element which have to be hashable just like in a set. It supports the same methods and operations as set does, e.g. membership test, union, intersection, and (symmetric) difference.
- Homepage: https://github.com/wheerd/multiset
- License: MIT
-
Latest release: 3.0.1
published about 4 years ago
Rankings
Dependent packages count: 19.5%
Dependent repos count: 34.0%
Average: 34.7%
Stargazers count: 40.5%
Forks count: 44.7%
Last synced:
6 months ago
Dependencies
dev-requirements.txt
pypi
- coverage >=4.3,<7 development
- pylint >=1.6,<3 development
- pytest >=3.0,<7 development
- pytest-cov >=2.5,<4.0 development
- setuptools_scm >=1.15,<7.0 development
- tox >=2.5,<4.0 development
docs/requirements.txt
pypi
- setuptools-scm ==6.4.1
- sphinx ==4.4.0
- sphinx-autodoc-typehints ==1.15.3
.github/workflows/python-dependabot.yml
actions
- actions/checkout v2 composite
- actions/setup-python v2 composite
.github/workflows/python-publish.yml
actions
- actions/checkout v2 composite
- actions/setup-python v2 composite
.github/workflows/python-test.yml
actions
- actions/checkout v2 composite
- actions/setup-python v2 composite
pyproject.toml
pypi
setup.py
pypi