sevamoo / SOMPY

A Python Library for Self Organizing Map (SOM)
Apache License 2.0
532 stars 241 forks source link

Code crashes on mapsize[0] * mapsize[1] #90

Closed businessglitch closed 4 years ago

businessglitch commented 5 years ago

This needs to be changed to self.mapsize[0]* self.mapsize[1] If one value is passed to the mapsize eg: mapsize[1000], this indicates the number of nodes

_size = [1, mapsize[0]] this creates a new array , [1,1000] self.mapsize = _size assigns newarray to self.mapsize.

self.nnodes = mapsize[0]mapsize[1].. here mapsize is still the old array that was passed as a parameter [1000] outof bound index, throws error