Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
gsoc proposal for 'NumPy - Vector math library integration'


NumPy - Vector math library integration


This project aims to fulfill, collaboratively with project mentor and the community, the exact design and implementation of the idea ‘vector math library integration’. Improving the performance of elementary functions in numpy like exp, pow, sin, cos etc. is aimed by making use of a few free libraries including sleef and yeppp.

Student Information

Name : Oguzhan Unlu

Email :

Telephone: +90(553)3057518

Timezone: UTC+2

IRC name: oguzhanunlu

GitHub profile:

Country of Residence : Turkey

Twitter handle: @unluuoguzhan

Personal website:

Blog for GSOC:

RSS feed for blog:

University Information:

University: Middle East Technical University

Major: Computer Engineering

Current Year and Expected Graduation Date: Junior (3rd year student) - June 2016

Degree: B.Sc. (Bachelor of Science)

Technical Overview

This project is about improving performance of elementary functions in numpy, for example exp, pow, sin, cos. Currently, numpy uses the standart C math library functions which are all based on taking scalar values as input, like computing a power function call for one number at a time. This is not the best way to implement if we want to call a function to multiple values at once. Applying the same function to many values at once leads us to think about optimizations. To illustrate, if we know that the environment, e.g. rounding mode, we are currently computing in will not change until it is done, it may allow for more reuse of temporary results, like lookup tables. Also, most modern hardware architectures are able to compute multiple operations in one instruction (SIMD, single instruction for multiple data) which could be exploited better when the execution paths are independent as would be the case here.

These optimizations are not workaday issues to do correct and architecture dependent, hence we better use already developed libraries written by experts. For example, there are free libraries such as yeppp and sleef as mentioned in ideas page. The main goal of this project is creating a way for numpy to use these libraries when they are available at build time. It should be possible to use these libraries by only a small set of wrapping functions.

Schedule and Deliverables

I have no other commitments during GSoC period, I will be able to commit at least 40h/per week to this project.

For the sake of a productive summer, a schedule is provided below, to serve as basis.

Phase Estimated Time
Researching possible options for the vector math implementation, learning how they work and how to build them 2 weeks
Understanding NumPy build system and integrating detected libraries in the NumPy build system 2 weeks
Implementing an interface to the libraries such that it should be flexible enough to accord with multiple implementations with minimal effort 3 weeks
Research on benchmark technologies, tools 1 week
Setting up representative benchmarks for libraries 1 week
Investigating possible accuracy and correctness differences in the implementations 2 weeks

On the last week, I am planning to finalise the project by scrubbing code, improving documentation etc..

Communication and Progress Tracking

Communication should be frequent in order to manage the project better. 2 meetings a week should be enough for review. Also, I probably will ask a few questions to mentor regarding design and implementation of the project idea. To make project mentor and community follow the progress easily, project might be hosted in a git repository. (e.g. a repository in GitHub) Following, after successful completion of the project, project code might be merged with main codebase.

Open Source Contribution Experience

I have contributed to 3 open source software projects by coding mainly for back-end parts and 1-2 projects by documentation, localisation issues etc..

In Summer 2013, I contributed to Pardus Linux, a GNU/Linux OS distribution developed by The Scientific & Technological Research Council of Turkey (TUBITAK). I developed an open source, cross platform desktop application during an organization like GSOC, details can be found at . I used Python, Qt4, Linux command line tools at infrastructure, especially ‘rsync’.

In Summer 2014, I contributed to Hazelcast, the leading open source in-memory data grid solution. I developed distributed web applications and implemented unit tests. I mainly used JavaEE technologies and HTTP Session Clustering module of Hazelcast.

As of April 2014, I am an official Mozillian, people who contribute to Mozilla projects call themselves as Mozillian, within a program named FirefoxOS Tablet Contribution Program maintained by Mozilla. I am one of 100 hackers selected to contribute to FirefoxOS’s transfer to tablets from phones. I contributed to parts related to UX.

I should note that I use Git in both personal and work projects for 3 years. I know and live the advantage of a distributed version control system over centralized ones.

Work/Internship Experience

Besides my open source contributions,

I am Linux System Administrator of IEEE Student Branch, METU as of June 2013. I am managing GNU/Linux servers of student branch running web/DNS etc. services and Google Apps applications of student branch.

I did an internship at Hazelcast, the leading in-memory data grid, during summer 2014.

I did an internship at TUBITAK, The Scientific & Technological Research Council of Turkey,in Summer 2013 within the program Pardus Software Camp.

Other Related Experience

For the last 2 years, I am a regular member of the team representing Middle East Technical University in international programming contests, including ACM ICPC and Vekua Cup. We have ranked 1st among foreign participants at ACM ICPC 2014, SEERC (Southeastern Europe Regional Contest). Also, I participate in online programming contests like Google Code Jam and Facebook Hacker Cup as much as possible.

Why Me and NumPy

I have intuition towards under the hood of numerical analysis and have a good experience in Python and C. As a spare time activity, I do research on implementations of basic functions in C, C++ and Python. This project of NumPy consists both, which excites and inspires me, so I really would like to work on this project in my summer. Also, I have proven 2 times (Pardus and Hazelcast) that I can work on a 3 month lasting open source project even if I am not familiar with the codebase. I believe my previous works and technical knowledge could make me able to accomplish this project. And lastly, I deeply want to continue to contributing to NumPy after GSOC.


I haven't contributed to NumPy yet, however, in the name of submitting a patch, I give the repository link of my Pardus Software Camp project, written in Python and a contribution to an open source operating system, Pardus,, so one could have an idea about my programming skills. For the sake of evaluating, if you'd like to have a look on my resume, check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment