title: Python: How to deal with expected a readable buffer object in Python
body: <p>I am quitenew to python and I am working on a python script I inherited from someone I work with, and I am getting this error:</p>
  
  <pre><code>expected a readable buffer object
  </code></pre>
  
  <p>The code causing this is:</p>
  
  <pre><code>self.y_NoShock_data = np.zeros((self.a_count+1,1,self.numberOfTags+1,lookback+forward,),dtype=enums.    
  self.y_data = np.zeros((self.a_count+1,len(self.SCL)+1,self.numberOfTags+1,lookback+forward,),dtype=enums.DataPoints)
  
  self.y_NoShock_cum_data = np.zeros_like(self.y_NoShock_data)
  self.y_cum_data = np.zeros_like(self.y_data)
  </code></pre>
  
  <p>enums.DataPoints looks like this:</p>
  
  <pre><code>enums.DataPoints = dtype([
          ('Amount','float32'),
          ])
  </code></pre>
  
  <p>The stack trace is as follows:</p>
  
  <pre><code>Internal Server 
  
  Error: /smCore/entity/1/runScenarioManager/
  Traceback (most recent call last):
    File "/Library/Python/2.7/site-packages/django/core/handlers/base.py", line 115, in get_response
      response = callback(request, *callback_args, **callback_kwargs)
    File "/Users/bentaliadoros/Documents/workspace/LivingSvnAmmar/trunk/ScenarioManagerStandAlone/smCore/views/createScenario.py", line 445, in runScenarioManager
      a = ScenarioExecutionController(sEA)
    File "/Users/bentaliadoros/Documents/workspace/LivingSvnAmmar/trunk/ScenarioManagerStandAlone/smCore/models/scenarioExecutionController.py", line 176, in __init__
      shockEventDataSet=[], lookback=self.lookback, forward=self.forward, period=self.period) #,
    File "/Users/bentaliadoros/Documents/workspace/LivingSvnAmmar/trunk/ScenarioManagerStandAlone/smCore/models/scenarioExecution.py", line 307, in buildSeedScenarioObject
      cls.updateScenarioParameters(shockContainerList,shockEventDataSet, shockEventDateList)
    File "/Users/bentaliadoros/Documents/workspace/LivingSvnAmmar/trunk/ScenarioManagerStandAlone/smCore/models/scenarioExecution.py", line 130, in updateScenarioParameters
      self.initialiseResultArrays()
    File "/Users/bentaliadoros/Documents/workspace/LivingSvnAmmar/trunk/ScenarioManagerStandAlone/smCore/models/scenarioExecution.py", line 154, in initialiseResultArrays
      self.y_NoShock_cum_data = np.zeros_like(self.y_NoShock_data,dtype=enums.DataPoints)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/numeric.py", line 116, in zeros_like
      res.fill(0)
  TypeError: expected a readable buffer object
  </code></pre>
  
  <p>He was working on a pc and I am on a Mac.
  I've been looking around but can't find a solution for this, can anyone point me in the right direction?</p>