TypeError: train expected 23 arguments, got 22
SammyS15 opened this issue · comments
Hello. I am on a Macbook Pro with Montery OS and i5 chip. I am trying to use somoclu and have tried various methods of installation. At first, I tried to do pip install somoclu but ran into the same errors others had. I then tried conda install, but that was expected to take something on order for five days to finish. I then cloned the repo and ran the commands which the slight modification of "make CC=gcc-11 CPP=g++-11 CXX=g++-11 LD=g++-11" as I have g++-11. All the previous warnings and errors (such as issues #23) went away. I tried to run the given code on the documentation page, and when I ran "%time som.train(data)" it spits out the following error:
`~/opt/anaconda3/lib/python3.8/site-packages/somoclu/train.py in train(self, data, epochs, radius0, radiusN, radiuscooling, scale0, scaleN, scalecooling)
220 self.umatrix.shape = (self._n_rows * self._n_columns, )
221 self.bmus.shape = (self.n_vectors * 2, )
--> 222 wrap_train(np.ravel(self._data), epochs, self._n_columns, self._n_rows,
223 self.n_dim, self.n_vectors, radius0, radiusN,
224 radiuscooling, scale0, scaleN, scalecooling,
TypeError: train expected 23 arguments, got 22`
I'm not sure what the problem is here. I went and looked at the file and only found 22 arguments in the definition. Any advice or suggestion to solve this?
I think it' s https://github.com/peterwittek/somoclu/blob/master/src/Python/somoclu/train.py#L236 that has 23 arguments expected, could it be you have an old version of somoclu python interface installed and a new version of cpp module?
Yeah, that was the issue. I had to copy and paste the one you linked and delete the old files that were installed via the pip install somoclu,
and it worked. Thank you so much!