Skip to content

Commit bfd6cb5

Browse files
committed
PyPi release (1.0.5)
1 parent ef9a38b commit bfd6cb5

File tree

3 files changed

+46
-6
lines changed

3 files changed

+46
-6
lines changed

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include Readme.md
2+
include LICENSE

Readme.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ SOM is a type of Artificial Neural Network able to convert complex, nonlinear st
1010
Installation
1111
---------------------
1212

13+
You can download XPySom from PyPi:
14+
15+
pip install xpysom
16+
17+
By default, dependencies for GPU execution are not downloaded.
18+
You can also specify a CUDA version to automatically download also those
19+
requirements. For example, for CUDA Toolkit 10.2 you would write:
20+
21+
pip install xpysom[cuda102]
22+
23+
Alternatively, you can manually install XPySom.
1324
Download XPySom to a directory of your choice and use the setup script:
1425

1526
git clone https://github.com/Manciukic/xpysom.git
@@ -46,6 +57,18 @@ You can obtain the position of the winning neuron on the map for a given sample
4657
som.winner(data[0])
4758
```
4859

60+
By default, XPySom executes on the GPU if available (and required packages are
61+
correctly installed). You can override this behaviour by passing the `xp`
62+
parameter to XPySom set to the package you want to use (only Numpy and Cupy
63+
have been tested, but in theory any Numpy-compliant package would work).
64+
65+
```python
66+
from xpysom import XPySom
67+
import numpy as np
68+
69+
som = XPySom(6, 6, 4, sigma=0.3, learning_rate=0.5, xp=np)
70+
```
71+
4972
Differences with MiniSom
5073
---------------------
5174
- The batch SOM algorithm is used (instead of the online used in MiniSom). Therefore, use only `train` to train the SOM, `train_random` and `train_batch` are not present.

setup.py

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,39 @@
11
#!/usr/bin/env python
2-
from distutils.core import setup
2+
from setuptools import setup
3+
4+
# read the contents of your README file
5+
from os import path
6+
this_directory = path.abspath(path.dirname(__file__))
7+
with open(path.join(this_directory, 'Readme.md'), encoding='utf-8') as f:
8+
long_description = f.read()
39

410
description = 'Minimalistic implementation of batch Self Organizing Maps (SOM) for parallel execution on CPU or GPU.'
511
keywords = ['machine learning', 'neural networks', 'clustering', 'dimentionality reduction']
612

713
setup(name='XPySom',
8-
version='1.0.0',
14+
version='1.0.5',
915
description=description,
16+
long_description=long_description,
17+
long_description_content_type="text/markdown",
1018
author='Riccardo Mancini',
1119
author_email="[email protected]",
1220
package_data={'': ['Readme.md']},
1321
include_package_data=True,
1422
license="GNU General Public License v3.0",
1523
packages=['xpysom'],
1624
install_requires=['numpy'],
17-
extra_requires={'gpu': ['cupy']},
25+
extras_require={
26+
'cuda90': ['cupy-cuda90'],
27+
'cuda92': ['cupy-cuda92'],
28+
'cuda100': ['cupy-cuda100'],
29+
'cuda101': ['cupy-cuda101'],
30+
'cuda102': ['cupy-cuda102'],
31+
},
1832
url='https://github.com/Manciukic/xpysom',
19-
download_url='https://github.com/Manciukic/xpysom/archive/v1.0.0.tar.gz',
33+
download_url='https://github.com/Manciukic/xpysom/archive/v1.0.5.tar.gz',
2034
keywords=keywords,
2135
classifiers=[
22-
'Development Status :: 3 - Alpha',
36+
'Development Status :: 4 - Beta',
2337
'Intended Audience :: Science/Research',
2438
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
2539
'Programming Language :: Python :: 3',
@@ -28,5 +42,6 @@
2842
'Programming Language :: Python :: 3.6',
2943
'Programming Language :: Python :: 3.7',
3044
'Programming Language :: Python :: 3.8',
31-
],
45+
],
46+
zip_safe=False,
3247
)

0 commit comments

Comments
 (0)