title: How to use a dictionary in Cython, inside a nogil function
body: <p>I want to use a dict like </p>
  
  <pre><code>{0: [1.], 
   1: [2.]} 
  </code></pre>
  
  <p>I know it is illegal to work with normal Python object inside a Cython nogil function, so I want to use <code>IntFloatDict</code> in 
  <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/fast_dict.pyx" rel="nofollow noreferrer">sklearn/utils/fast_dict.pyx</a>.</p>
  
  <p>After replacing the normal Python dict inside the Cython nogil function with <code>IntFloatDict</code>:</p>
  
  <pre><code># distutils: language=c
  cimport numpy as np
  from fast_dict cimport IntFloatDict
  
  
  np.import_array()
  
  
  cdef IntFloatDict test_fast_dict(IntFloatDict a) nogil:
      return a
  
  
  cdef IntFloatDict t 
  t = IntFloatDict(np.ndarray([1]), np.ndarray([5.]))
  test_fast_dict(t)
  </code></pre>
  
  <p>Then I came accross:</p>
  
  <pre><code>Error compiling Cython file:
  ------------------------------------------------------------
  ...
  
  
  np.import_array()
  
  
  cdef IntFloatDict test_fast_dict(IntFloatDict a):
      ^
  ------------------------------------------------------------
  
  test_c_nogil.pyx:9:5: 'IntFloatDict' is not a type identifier
  </code></pre>
  
  <p>What's the point above, how to solve it?</p>