FlowSOM icon indicating copy to clipboard operation
FlowSOM copied to clipboard

AttributeError: 'DataFrame' object has no attribute 'as_matrix'

Open prubbens opened this issue 4 years ago • 4 comments

As Pandas has been updated to v1.0, I think as_matrix should be replaced by .values(). See https://pandas.pydata.org/pandas-docs/version/0.23.4/generated/pandas.DataFrame.as_matrix.html

Otherwise, great to have FlowSOM in Python as well!

prubbens avatar Apr 16 '20 08:04 prubbens

Correction, was able to fix it by changing it to .to_numpy().

prubbens avatar Apr 16 '20 08:04 prubbens

Hi @prubbens I'm new to this scripting and python work but i'm having the exact same issues - did you change this in the flowsom source code? Which part(s) did you change if you don't mind saying. Thanks

ghowell2812 avatar May 06 '20 13:05 ghowell2812

In lines 74 and 81 of the script flowsomtool.py replace:

   self.tf_matrix = log_data.as_matrix()

by

   self.tf_matrix = log_data.to_numpy() 

and

    self.tf_matrix = self.df.as_matrix()

by

    self.tf_matrix = self.df.to_numpy()

prubbens avatar May 07 '20 08:05 prubbens

This is still broken in the release version of the code.

An update would be greatly appreciated.

AlexanderWMacFarlaneIV avatar Jun 18 '22 17:06 AlexanderWMacFarlaneIV