In [1]:
import vespa
WARNING:root:PyMultiNest not available; only emcee fits will be possible.
WARNING:root:progressbar not imported
In [3]:
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import vespa
from sklearn.datasets import load_iris
import mpld3
from mpld3 import plugins, utils
%matplotlib inline
In [4]:
starpop = vespa.MultipleStarPopulation(1)
In [28]:
starpop.prophist2d('distance','distmod')
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-28-d5124a9932f1> in <module>()
----> 1 starpop.prophist2d('distance','distmod')
/Users/ganeshravichandran/anaconda/lib/python2.7/site-packages/VESPA-0.2.5-py2.7-macosx-10.5-x86_64.egg/vespa/stars/populations.pyc in prophist2d(self, propx, propy, mask, logx, logy, fig, selected, **kwargs)
406 if mask is None:
407 mask = np.ones_like(self.stars.index)
--> 408 xvals = self.stars[mask][propx].values
409 yvals = self.stars[mask][propy].values
410
/Users/ganeshravichandran/anaconda/lib/python2.7/site-packages/pandas/core/frame.pyc 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):
/Users/ganeshravichandran/anaconda/lib/python2.7/site-packages/pandas/core/frame.pyc in _getitem_column(self, key)
1790 result = self._constructor(self._data.get(key))
1791 if result.columns.is_unique:
-> 1792 result = result[key]
1793
1794 return result
/Users/ganeshravichandran/anaconda/lib/python2.7/site-packages/pandas/core/frame.pyc 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):
/Users/ganeshravichandran/anaconda/lib/python2.7/site-packages/pandas/core/frame.pyc 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
/Users/ganeshravichandran/anaconda/lib/python2.7/site-packages/pandas/core/generic.pyc in _get_item_cache(self, item)
1066 res = cache.get(item)
1067 if res is None:
-> 1068 values = self._data.get(item)
1069 res = self._box_item_values(item, values)
1070 cache[item] = res
/Users/ganeshravichandran/anaconda/lib/python2.7/site-packages/pandas/core/internals.pyc in get(self, item, fastpath)
2847
2848 if not isnull(item):
-> 2849 loc = self.items.get_loc(item)
2850 else:
2851 indexer = np.arange(len(self.items))[isnull(self.items)]
/Users/ganeshravichandran/anaconda/lib/python2.7/site-packages/pandas/core/index.pyc in get_loc(self, key)
1400 loc : int if unique index, possibly slice or mask if not
1401 """
-> 1402 return self._engine.get_loc(_values_from_object(key))
1403
1404 def get_value(self, series, key):
pandas/index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:3820)()
pandas/index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:3700)()
pandas/hashtable.pyx in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12323)()
pandas/hashtable.pyx in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12274)()
KeyError: 'distance'
In [ ]:
Content source: timothydmorton/vespa-visualization
Similar notebooks: