Skip to content

Error when using Combine_Ligand_Protein() function #4

Description

@sawsimeon

Hi,

Recieved the following error when using the function

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-100-f557f3320197> in <module>()
      2                                         header_ligand = compound_descriptors,
      3                                         protein = protein,
----> 4                                         header_protein = protein_descriptors)

<ipython-input-99-80e544229008> in cross_terms_ligand_protein(ligand, header_ligand, protein, header_protein)
      8         for jj in range(Cp):
      9             H_lp.append(header_ligand[j]+'*'+header_protein[jj])
---> 10             cross = np.multiply(ligand[:,j], protein[:, jj])
     11             Cross_lp = np.append(Cross_lp, np.reshape(cross, (ligand.shape[0],1)),
     12                                 axis = 1)

C:\Users\Saw\Anaconda\envs\py33\lib\site-packages\pandas\core\frame.py in __getitem__(self, key)
   1778             return self._getitem_multilevel(key)
   1779         else:
-> 1780             return self._getitem_column(key)
   1781 
   1782     def _getitem_column(self, key):

C:\Users\Saw\Anaconda\envs\py33\lib\site-packages\pandas\core\frame.py in _getitem_column(self, key)
   1785         # get column
   1786         if self.columns.is_unique:
-> 1787             return self._get_item_cache(key)
   1788 
   1789         # duplicate columns & possible reduce dimensionaility

C:\Users\Saw\Anaconda\envs\py33\lib\site-packages\pandas\core\generic.py in _get_item_cache(self, item)
   1064         """ return the cached item, item represents a label indexer """
   1065         cache = self._item_cache
-> 1066         res = cache.get(item)
   1067         if res is None:
   1068             values = self._data.get(item)

TypeError: unhashable type: 'slice'

For notebook viewer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions