Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • T transonic
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • fluiddyn
  • transonic
  • Issues
  • #27
Closed
Open
Created Sep 03, 2019 by Bitbucket Importer@bitbucket_importerMaintainer

transonic.dataclass for numba.jitclass and cython cdef class

Created originally on Bitbucket by paugier (Pierre Augier)

from transonic import dataclass, boost

@dataclass
class MyStruc:
    attr: int
    
    def compute(self, arg: int):
        return self.attr + arg
        
    def modify(self, arg: int):
        self.attr = arg
        
@boost
def func(o: MyStruct, a: int):
    o.modify(a)
    return o

@boost
def func1(o: MyStruct, a: int):
    return o.compute(a)

‌

See https://github.com/serge-sans-paille/pythran/issues/1116

and what is done in https://github.com/ogrisel/pygbm/blob/master/pygbm/splitting.py#L21

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking