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

[MRG] ROOT 6 support (finally) #181

Merged
merged 6 commits into from Apr 1, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .landscape.yaml
@@ -0,0 +1,3 @@
ignore-paths:
- docs
- root_numpy/extern
3 changes: 2 additions & 1 deletion .travis.yml
Expand Up @@ -4,7 +4,8 @@ python:
- "2.7"
- "3.4"
env:
- ROOT=5-34-18
- ROOT=v5-34-18
- ROOT=master
install: source ci/install.sh
script: bash ci/test.sh
after_success:
Expand Down
6 changes: 4 additions & 2 deletions README.rst
Expand Up @@ -7,8 +7,10 @@ root_numpy

.. image:: https://travis-ci.org/rootpy/root_numpy.png
:target: https://travis-ci.org/rootpy/root_numpy
.. image:: https://coveralls.io/repos/rootpy/root_numpy/badge.png
:target: https://coveralls.io/r/rootpy/root_numpy
.. image:: https://coveralls.io/repos/rootpy/root_numpy/badge.svg?branch=master
:target: https://coveralls.io/r/rootpy/root_numpy?branch=master
.. image:: https://landscape.io/github/rootpy/root_numpy/master/landscape.svg?style=flat
:target: https://landscape.io/github/rootpy/root_numpy/master
.. image:: https://pypip.in/v/root_numpy/badge.png
:target: https://pypi.python.org/pypi/root_numpy
.. image:: https://pypip.in/d/root_numpy/badge.png
Expand Down
7 changes: 4 additions & 3 deletions ci/install.sh
Expand Up @@ -9,12 +9,13 @@ set -e
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get -qq update
sudo apt-get -qq install g++-4.8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 90
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90
sudo apt-get -qq install python-nose python-pip
pip install coverage coveralls

# Install the ROOT binary
time wget --no-check-certificate https://copy.com/rtIyUdxgjt7h/ci/root_builds/rootv${ROOT}_python${TRAVIS_PYTHON_VERSION}_gcc4.8_x86_64.tar.gz
time tar zxf rootv${ROOT}_python${TRAVIS_PYTHON_VERSION}_gcc4.8_x86_64.tar.gz
mv rootv${ROOT}_python${TRAVIS_PYTHON_VERSION}_gcc4.8_x86_64 root
time wget --no-check-certificate https://copy.com/rtIyUdxgjt7h/ci/root_builds/root${ROOT}_python${TRAVIS_PYTHON_VERSION}_gcc4.8_x86_64.tar.gz
time tar zxf root${ROOT}_python${TRAVIS_PYTHON_VERSION}_gcc4.8_x86_64.tar.gz
mv root${ROOT}_python${TRAVIS_PYTHON_VERSION}_gcc4.8_x86_64 root
source root/bin/thisroot.sh
3 changes: 3 additions & 0 deletions ci/test.sh
Expand Up @@ -6,11 +6,14 @@

set -e

gcc -dumpversion
g++ -dumpversion
python --version
python -c "import numpy; print('numpy %s' % numpy.__version__)"
# Check if ROOT and PyROOT work
#root -l -q
python -c "import ROOT; ROOT.TBrowser()"
python -c "from __future__ import print_function; import ROOT; print(ROOT.gROOT.GetVersion())"

export PYTHONPATH=/home/travis/.local/lib/python${TRAVIS_PYTHON_VERSION}/site-packages/:$PYTHONPATH

Expand Down
14 changes: 9 additions & 5 deletions docs/install.rst
Expand Up @@ -17,9 +17,9 @@ be found, the installation aborts.

root_numpy has been tested with:

* ROOT 5.32, 5.34
* NumPy 1.6, 1.7, 1.8
* Python 2.6, 2.7
* ROOT 5.32, 5.34, 6.04
* NumPy 1.6, 1.7, 1.8, 1.9
* Python 2.6, 2.7, 3.4
* GNU/Linux, Mac OS

.. warning:: **Mac OS:** the libstdc++ and libc++ ABIs are not compatible.
Expand Down Expand Up @@ -72,8 +72,6 @@ To install a `released version
<http://pypi.python.org/pypi/root_numpy/>`_ of
`root_numpy` use `pip <http://pypi.python.org/pypi/pip>`_.

.. note:: This will install the latest version of root_numpy on PyPI which may
be lacking many new unreleased features.

To install in your `home directory
<http://www.python.org/dev/peps/pep-0370/>`_::
Expand All @@ -84,6 +82,12 @@ To install system-wide (requires root privileges)::

sudo ROOTSYS=$ROOTSYS pip install root_numpy

.. note:: The above will install the latest version of root_numpy on PyPI
and may be lacking new unreleased features. You can also use pip to
install the latest version of root_numpy on github::

pip install --upgrade --user https://github.com/rootpy/root_numpy/zipball/master

Running the Tests
=================

Expand Down
8 changes: 4 additions & 4 deletions root_numpy/_evaluate.py
Expand Up @@ -103,7 +103,7 @@ def evaluate(root_object, array):
if ndim == 1:
if array.ndim != 1:
raise ValueError("array must be 1-dimensional")
return _librootnumpy.evaluate_f1(
return _librootnumpy.evaluate_formula_1d(
ROOT.AsCObject(root_object), array)
if array.ndim != 2:
raise ValueError("array must be 2-dimensional")
Expand All @@ -112,13 +112,13 @@ def evaluate(root_object, array):
"length of the second dimension must equal "
"the dimension of the function")
if ndim == 2:
return _librootnumpy.evaluate_f2(
return _librootnumpy.evaluate_formula_2d(
ROOT.AsCObject(root_object), array)
elif ndim == 3:
return _librootnumpy.evaluate_f3(
return _librootnumpy.evaluate_formula_3d(
ROOT.AsCObject(root_object), array)
# 4d
return _librootnumpy.evaluate_f4(
return _librootnumpy.evaluate_formula_4d(
ROOT.AsCObject(root_object), array)
elif isinstance(root_object, ROOT.TGraph):
if array.ndim != 1:
Expand Down
2 changes: 1 addition & 1 deletion root_numpy/info.py
Expand Up @@ -6,5 +6,5 @@
|_| \___/ \___/ \__|___|_| |_|\__,_|_| |_| |_| .__/ \__, | {0}
|_____| |_| |___/
"""
__version__ = '3.4.1.dev0'
__version__ = '4.0.0.dev0'
__doc__ = __doc__.format(__version__)