This package is intended to operate as a simple intuitive interface for handling laborious elementary set theory calculations. The goal is to make all operations on sets feel intuitive and number like (similar to MATLAB's handling of matrices)!
Installation
Ensure that Python is installed on your machine then run pip install SetCalcPy
Invoke import SetCalcPy in your file or console!
Enjoy!
Simple Operations
- Declare sets like so
A = Set(1,2,3)and `B = Set(1,2,Set(3,4)) - Take the union of two sets (find all elements in
AorB):A + B - Take the intersection of two sets (find all elements in
AandB):A & B - Take the disjoint of two sets (find all elements in
Abut notB):A - B - Find the powerset of a set (all subsets of
A):A.powerSet() - Calculate the cartesian product of two or more sets:
A * BorA.cartesianProduct(*sets to multiply by*) - Find the complement of a set (all elements in the universe specified but not in
A):A.complement()
Other Features
- Iterate through sets just like lists
- Access elements just like lists (the first element of
AisA[0]) - Test set equality:
A == B - Convert to a list:
A.__list__() - Check for membership:
1 in Aevaluates to True because 1 is an element ofA - Check length:
len(A)
Change Log
- Fixed issue when printing Sets containing tuples with Sets where Sets would not display properly
- Fixed miscalculation bug with the cartesian product
- Fixed issues with Sets containing strings
Metadata
Release files for SetCalcPy 1.2.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| SetCalcPy-1.2.6.tar.gz | 18.3 kB | Without provenance | Details for SetCalcPy-1.2.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| SetCalcPy-1.2.6-py3-none-any.whl | Python 3 | none | any | Details for SetCalcPy-1.2.6-py3-none-any.whl |
Total release size: 37.3 kB
Release files / SetCalcPy-1.2.6.tar.gz
| Download URL | SetCalcPy-1.2.6.tar.gz |
|---|---|
| Size | 18.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2464021eb1940cfa17554e14c1a495d313adf0ce65006e9669f8648dc8465df5
|
|
BLAKE2b-256 checksum How to use checksums |
1666b36a38e9279614e58320214409699f804ef0fc17211cbb010ca760141720
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.5
|
Release files / SetCalcPy-1.2.6-py3-none-any.whl
| Download URL | SetCalcPy-1.2.6-py3-none-any.whl |
|---|---|
| Size | 18.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8bc4d2dd7b55ee3cbf4ebdf4404c06a9d000333dc55075ed0132f40183040397
|
|
BLAKE2b-256 checksum How to use checksums |
c5b80ea330ee834273f68883c22fd1e4b44c92ef4cd066d6e3daf8c8ece29a24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.5
|
Security for SetCalcPy 1.2.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.