Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

numpy #330

Open
aep opened this issue Jun 15, 2017 · 3 comments
Open

numpy #330

aep opened this issue Jun 15, 2017 · 3 comments

Comments

@aep
Copy link

aep commented Jun 15, 2017

continuing the issue started with #112

numpy is currently the most relevant data science library, but it uses c extensions which grumpy doesn't support.

Maybe there's a way to bring numpy over to grumpy

@zfsamzfsam
Copy link

+1

@trotterdylan
Copy link
Contributor

It is possible to implement numpy using Grumpy, in either Python or Go and then leverage the libraries built on top of numpy. But it'd be very challenging to leverage the numpy C extension directly, and the results would probably be sub-optimal or partially broken since Grumpy has no GIL and numpy may use it for synchronization.

Having said that, depending on how the code is written, it may be possible to leverage parts of the code and expose them to Go via cgo. How much code could be reused in this way kind of depends on how deep in the extension the Python part is rooted: if they use PyObjects through all the code then that'd be a problem, but if they use numpy specific data structures and functions and then a thin layer of C extension code on the top, then things would be much easier.

@zfsamzfsam
Copy link

c2goasm: C to Go Assembly
https://github.com/minio/c2goasm

Introduction

This is a tool to convert assembly as generated by a C/C++ compiler into Golang assembly. It is meant to be used in combination with asm2plan9s in order to automatically generate pure Go wrappers for C/C++ code

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants