In [1]:
import Starfish

In [2]:
import Starfish.emulator

In [4]:
pa = Starfish.emulator.PCAGrid()

In [ ]:
pa.

In [5]:
import numpy as np

In [6]:
epar = np.load('eparams_emcee.npy')

In [8]:
from itertools import chain

In [58]:
vec = np.arange(10)

In [59]:
vec.resize((10, 1, 1))

In [60]:
vec.shape


Out[60]:
(10, 1, 1)

In [61]:
vec


Out[61]:
array([[[0]],

       [[1]],

       [[2]],

       [[3]],

       [[4]],

       [[5]],

       [[6]],

       [[7]],

       [[8]],

       [[9]]])

In [62]:
vec.squeeze()


Out[62]:
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])

In [63]:
vec.dtype


Out[63]:
dtype('int64')

In [55]:
vec.shape = (-1)

In [ ]:


In [66]:
dog = np.zeros((7, 100))
cat = np.ones((7, 1000))

In [72]:
for lres, hres in zip(dog, cat):
    lres[:] = 7.4
    hres[3] = 9

In [ ]:


In [ ]:


In [56]:
vec


Out[56]:
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])

In [57]:
vec.shape


Out[57]:
(10,)

In [7]:
em = Starfish.emulator.Emulator(pa, epar)


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-7-d94ca87157a9> in <module>()
----> 1 em = Starfish.emulator.Emulator(pa, epar)

/Users/gully/GitHub/Starfish/Starfish/emulator.py in __init__(self, pca, eparams)
    338         self.pca = pca
    339         self.lambda_xi = eparams[0]
--> 340         self.h2params = eparams[1:].reshape(self.pca.m, -1)**2
    341 
    342         #Determine the minimum and maximum bounds of the grid

AttributeError: 'PCA' object has no attribute 'm'

In [ ]: