Skip to content

Instantly share code, notes, and snippets.

@jnothman
Created August 2, 2016 00:03
Show Gist options
  • Select an option

  • Save jnothman/cd59bc47a99f13610c90d73fafc46402 to your computer and use it in GitHub Desktop.

Select an option

Save jnothman/cd59bc47a99f13610c90d73fafc46402 to your computer and use it in GitHub Desktop.
cdef cppclass myclass[T]:
T x
object foo(self):
return self.x
from cython cimport floating
def get(floating x):
cdef myclass[floating] *v = new myclass[floating]()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment