https://github.com/erdogant/ismember
ismember
https://github.com/erdogant/ismember
arrays ismember lookup matching
Last synced: 6 months ago
JSON representation
ismember
- Host: GitHub
- URL: https://github.com/erdogant/ismember
- Owner: erdogant
- License: other
- Created: 2020-01-19T21:42:35.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-02T21:24:22.000Z (7 months ago)
- Last Synced: 2025-04-12T06:20:27.290Z (6 months ago)
- Topics: arrays, ismember, lookup, matching
- Language: Python
- Homepage: https://erdogant.github.io/ismember
- Size: 3.39 MB
- Stars: 8
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
# ismember
[](https://img.shields.io/pypi/pyversions/ismember)
[](https://pypi.org/project/ismember/)

[](https://github.com/erdogant/ismember/blob/master/LICENSE)
[](https://pepy.tech/project/ismember)
[](https://pepy.tech/project/ismember/)
[](https://erdogant.github.io/ismember/)``ismember`` is a Python library that checks whether the elements in X is present in Y.
#
**⭐️ Star this repo if you like it ⭐️**
#### [Documentation pages](https://erdogant.github.io/ismember/)
On the [documentation pages](https://erdogant.github.io/ismember/) you can find more information about ``ismember`` with examples.
#
##### Install ismember from PyPI
```bash
pip install ismember # normal install
pip install -U ismember # update if needed
```### Import ismember package
```python
from ismember import ismember
```
#### Quick example
Use the documentation pages for more detailed usage. Some of the most used functionalities are linked below.
```python
from ismember import ismember
# Example with lists
I, idx = ismember([1,2,3,None], [4,1,2])
I, idx = ismember(["1","2","3"], ["4","1","2"])
```#
#### [Example: Check whether the elements of X are present in Y](https://erdogant.github.io/ismember/pages/html/Examples.html#)
#
#### [Example: Determine the corresponding location of the values that are present in Y array](https://erdogant.github.io/ismember/pages/html/Examples.html#determine-the-corresponding-location-of-the-values-that-are-present-in-y-array)
#
#### [Example: Row wise comparison](https://erdogant.github.io/ismember/pages/html/Examples.html#row-wise-comparison-1)
#
#### [Example: Elementwise comparison](https://erdogant.github.io/ismember/pages/html/Examples.html#elementwise-comparison)
### References
* https://in.mathworks.com/help/matlab/ref/ismember.html### Maintainer
* Erdogan Taskesen, github: [erdogant](https://github.com/erdogant)
* Contributions are welcome.
* If you wish to buy me a Coffee for this work, it is very appreciated :)