diff --git a/.travis.yml b/.travis.yml
index bbadfa5d15251..d90d7396476a6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,34 +1,18 @@
language: python
-env:
- - COVERAGE=--with-coverage
-python:
- - "2.7"
- - "2.6"
- - "3.3"
virtualenv:
system_site_packages: true
-before_install:
- - if [[ $TRAVIS_PYTHON_VERSION != '2.7' ]]; then wget http://repo.continuum.io/miniconda/Miniconda-2.2.2-Linux-x86_64.sh -O miniconda.sh ; fi
- - if [[ $TRAVIS_PYTHON_VERSION != '2.7' ]]; then chmod +x miniconda.sh ; fi
- - if [[ $TRAVIS_PYTHON_VERSION != '2.7' ]]; then ./miniconda.sh -b ; fi
- - if [[ $TRAVIS_PYTHON_VERSION != '2.7' ]]; then export PATH=/home/travis/anaconda/bin:$PATH ; fi
- - if [[ $TRAVIS_PYTHON_VERSION != '2.7' ]]; then conda update --yes conda ; fi
- - if [[ $TRAVIS_PYTHON_VERSION != '2.7' ]]; then conda update --yes conda ; fi
- - if [[ $TRAVIS_PYTHON_VERSION != '2.7' ]]; then conda create -n testenv --yes pip python=$TRAVIS_PYTHON_VERSION ; fi
- - if [[ $TRAVIS_PYTHON_VERSION != '2.7' ]]; then source activate testenv ; fi
- - if [[ $TRAVIS_PYTHON_VERSION != '2.7' ]]; then conda install --yes numpy scipy nose ; fi
- - if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then sudo apt-get update -qq ; fi
- - if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then sudo apt-get install -qq python-scipy python-nose python-pip ; fi
-install:
- - python setup.py build_ext --inplace
- - if [ "${COVERAGE}" == "--with-coverage" ]; then sudo pip install coverage; fi
- - if [ "${COVERAGE}" == "--with-coverage" ]; then sudo pip install coveralls; fi
-script:
- - if [ "${COVERAGE}" == "--with-coverage" ]; then
- - make test-coverage;
- - else
- - make test;
- - fi
+env:
+ matrix:
+ - DISTRIB="ubuntu" PYTHON_VERSION="2.7" INSTALL_ATLAS="true"
+ COVERAGE="true"
+ # This environment tests the oldest supported anaconda env
+ - DISTRIB="conda" PYTHON_VERSION="2.6" INSTALL_MKL="false"
+ NUMPY_VERSION="1.6.2" SCIPY_VERSION="0.11.0"
+ # This environment tests the newest supported anaconda env
+ - DISTRIB="conda" PYTHON_VERSION="3.4" INSTALL_MKL="true"
+ NUMPY_VERSION="1.8.1" SCIPY_VERSION="0.13.3"
+install: source continuous_integration/install.sh
+script: bash continuous_integration/test_script.sh
after_success:
- - if [ "${COVERAGE}" == "--with-coverage" ]; then coveralls; fi
-
+ - if [[ "$COVERAGE" == "true" ]]; then coveralls; fi
+cache: apt
diff --git a/README.rst b/README.rst
index 6ad2b3726f9d5..01f2fb41722ee 100644
--- a/README.rst
+++ b/README.rst
@@ -34,8 +34,10 @@ Important links
Dependencies
============
-scikit-learn is tested to work under Python 2.6+ and Python 3.3+
-(using the same codebase thanks to an embedded copy of `six `_).
+scikit-learn is tested to work under Python 2.6, Python 2.7, and Python 3.4.
+(using the same codebase thanks to an embedded copy of
+`six `_). It should also work against Python
+3.3.
The required dependencies to build the software NumPy >= 1.6.1, SciPy >= 0.9
and a working C/C++ compiler.
diff --git a/continuous_integration/install.sh b/continuous_integration/install.sh
new file mode 100644
index 0000000000000..359b45c2cc08c
--- /dev/null
+++ b/continuous_integration/install.sh
@@ -0,0 +1,48 @@
+#!/bin/bash
+# This script is meant to be called by the "install" step defined in
+# .travis.yml. See http://docs.travis-ci.com/ for more details.
+# The behavior of the script is controlled by environment variabled defined
+# in the .travis.yml in the top level folder of the project.
+
+set -e
+
+sudo apt-get update -qq
+if [[ "$INSTALL_ATLAS" == "true" ]]; then
+ sudo apt-get install -qq libatlas3gf-base libatlas-dev
+fi
+
+if [[ "$DISTRIB" == "conda" ]]; then
+ # Deactivate the travis-provided virtual environment and setup a
+ # conda-based environment instead
+ deactivate
+
+ # Use the miniconda installer for faster download / install of conda
+ # itself
+ wget http://repo.continuum.io/miniconda/Miniconda-2.2.2-Linux-x86_64.sh \
+ -O miniconda.sh
+ chmod +x miniconda.sh && ./miniconda.sh -b
+ export PATH=/home/travis/anaconda/bin:$PATH
+ conda update --yes conda
+
+ # Configure the conda environment and put it in the path using the
+ # provided versions
+ conda create -n testenv --yes python=$PYTHON_VERSION pip nose \
+ numpy=$NUMPY_VERSION scipy=$SCIPY_VERSION
+ source activate testenv
+
+ if [[ "$INSTALL_MKL" == "true" ]]; then
+ # Make sure that MKL is used
+ conda install --yes mkl
+ else
+ # Make sure that MKL is not used
+ conda remove --yes --features mkl || echo "MKL not installed"
+ fi
+
+elif [[ "$DISTRIB" == "ubuntu" ]]; then
+ # Use standard ubuntu packages in their default version
+ sudo apt-get install -qq python-scipy python-nose python-pip
+fi
+
+if [[ "$COVERAGE" == "true" ]]; then
+ pip install coverage coveralls
+fi
diff --git a/continuous_integration/test_script.sh b/continuous_integration/test_script.sh
new file mode 100644
index 0000000000000..f25f45e4b222e
--- /dev/null
+++ b/continuous_integration/test_script.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+# This script is meant to be called by the "script" step defined in
+# .travis.yml. See http://docs.travis-ci.com/ for more details.
+# The behavior of the script is controlled by environment variabled defined
+# in the .travis.yml in the top level folder of the project.
+
+set -e
+
+python --version
+python -c "import numpy; print('numpy %s' % numpy.__version__)"
+python -c "import scipy; print('scipy %s' % scipy.__version__)"
+python setup.py build_ext --inplace
+
+if [[ "$COVERAGE" == "true" ]]; then
+ export WITH_COVERAGE="--with-coverage"
+else
+ export WITH_COVERAGE=""
+fi
+nosetests -s -v $WITH_COVERAGE sklearn
diff --git a/doc/Makefile b/doc/Makefile
index a59bc31ee0dd7..c9512c0f23015 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -12,7 +12,7 @@ PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex latexpdf changes linkcheck doctest
+.PHONY: help clean html dirhtml pickle json latex latexpdf changes linkcheck doctest
all: html-noplot
@@ -22,8 +22,6 @@ help:
@echo " dirhtml to make HTML files named index.html in directories"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
- @echo " htmlhelp to make HTML files and a HTML help project"
- @echo " qthelp to make HTML files and a qthelp project"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " changes to make an overview of all changed/added/deprecated items"
@@ -65,21 +63,6 @@ json:
@echo
@echo "Build finished; now you can process the JSON files."
-htmlhelp:
- $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
- @echo
- @echo "Build finished; now you can run HTML Help Workshop with the" \
- ".hhp project file in $(BUILDDIR)/htmlhelp."
-
-qthelp:
- $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
- @echo
- @echo "Build finished; now you can run "qcollectiongenerator" with the" \
- ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
- @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/scikit-learn.qhcp"
- @echo "To view the help file:"
- @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/scikit-learn.qhc"
-
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
diff --git a/doc/developers/index.rst b/doc/developers/index.rst
index 797fdab86080e..22ac0068e2d48 100644
--- a/doc/developers/index.rst
+++ b/doc/developers/index.rst
@@ -647,9 +647,11 @@ To summarize, a `__init__` should look like::
self.param1 = param1
self.param2 = param2
-There should be no logic, and the parameters should not be changed.
-The corresponding logic should be put where the parameters are used. The
-following is wrong::
+There should be no logic, not even input validation,
+and the parameters should not be changed.
+The corresponding logic should be put where the parameters are used,
+typically in ``fit``.
+The following is wrong::
def __init__(self, param1=1, param2=2, param3=3):
# WRONG: parameters should not be modified
@@ -660,8 +662,9 @@ following is wrong::
# the argument in the constructor
self.param3 = param2
-Scikit-learn relies on this mechanism to introspect objects to set
-their parameters by cross-validation.
+The reason for postponing the validation is that the same validation
+would have to be performed in ``set_params``,
+which is used in algorithms like ``GridSearchCV``.
Fitting
^^^^^^^
diff --git a/doc/index.rst b/doc/index.rst
index fae3e68c36b73..c86fd5c7930e0 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -161,7 +161,7 @@
Applications: Visualization, Increased efficiency
Algorithms:
-:ref:`PCA`, :ref:`Isomap`, :ref:`non-negative matrix factorization`.
+:ref:`PCA`, :ref:`feature selection`, :ref:`non-negative matrix factorization`.
.. raw:: html
diff --git a/doc/modules/clustering.rst b/doc/modules/clustering.rst
index 83d032f5fa110..25b3bf4ec400a 100644
--- a/doc/modules/clustering.rst
+++ b/doc/modules/clustering.rst
@@ -118,15 +118,37 @@ K-means
The :class:`KMeans` algorithm clusters data by trying to separate samples
in n groups of equal variance, minimizing a criterion known as the
-'inertia' of the groups. This algorithm requires the number of clusters to
-be specified. It scales well to large number of samples and has been used
-across a large range of application areas in many different fields. It is
-also equivalent to the expectation-maximization algorithm when setting the
-covariance matrix to be diagonal, equal and small. The K-means algorithm
-aims to choose centroids :math:`C` that minimise the within cluster sum of
-squares objective function with a dataset :math:`X` with :math:`n` samples:
-
-.. math:: J(X, C) = \sum_{i=0}^{n}\min_{\mu_j \in C}(||x_j - \mu_i||^2)
+`inertia` or within-cluster sum-of-squares.
+This algorithm requires the number of clusters to be specified.
+It scales well to large number of samples and has been used
+across a large range of application areas in many different fields.
+
+The k-means algorithm divides a set of :math:`N` samples :math:`X`:
+into :math:`K` disjoint clusters :math:`C`,
+each described by the mean :math:`\mu_j` of the samples in the cluster.
+The means are commonly called the cluster "centroids";
+note that they are not, in general, points from :math:`X`,
+although they live in the same space.
+The K-means algorithm aims to choose centroids
+that minimise the *inertia*, or within-cluster sum of squared criterion:
+
+.. math:: \sum_{i=0}^{n}\min_{\mu_j \in C}(||x_j - \mu_i||^2)
+
+Inertia, or the within-cluster sum of squares criterion,
+can be recognized as a measure of how internally coherent clusters are.
+It suffers from various drawbacks:
+
+- Inertia makes the assumption that clusters are convex and isotropic,
+ which is not always the case. It responds poorly to elongated clusters,
+ or manifolds with irregular shapes.
+
+- Inertia is not a normalized metric: we just know that lower values are
+ better and zero is optimal. But in very high-dimensional spaces, Euclidean
+ distances tend to become inflated
+ (this is an instance of the so-called "curse of dimensionality").
+ Running a dimensionality reduction algorithm such as `PCA`
+ prior to k-means clustering can alleviate this problem
+ and speed up the computations.
K-means is often referred to as Lloyd's algorithm. In basic terms, the
algorithm has three steps. The first step chooses the initial centroids, with
@@ -144,7 +166,10 @@ until the centroids do not move significantly.
:align: right
:scale: 35
-The algorithm can be understood through the concept of `Voronoi diagrams
+K-means is equivalent to the expectation-maximization algorithm
+with a small, all-equal, diagonal covariance matrix.
+
+The algorithm can also be understood through the concept of `Voronoi diagrams
`_. First the Voronoi diagram of
the points is calculated using the current centroids. Each segment in the
Voronoi diagram becomes a separate cluster. Secondly, the centroids are updated
@@ -753,33 +778,6 @@ classes according to some similarity metric.
.. currentmodule:: sklearn.metrics
-Inertia
--------
-
-Presentation and usage
-~~~~~~~~~~~~~~~~~~~~~~
-
-TODO: factorize inertia computation out of kmeans and then write me!
-
-
-Advantages
-~~~~~~~~~~
-
-- No need for the ground truth knowledge of the "real" classes.
-
-Drawbacks
-~~~~~~~~~
-
-- Inertia makes the assumption that clusters are convex and isotropic
- which is not always the case especially of the clusters are manifolds
- with weird shapes: for instance inertia is a useless metrics to evaluate
- clustering algorithm that tries to identify nested circles on a 2D plane.
-
-- Inertia is not a normalized metrics: we just know that lower values are
- better and bounded by zero. One potential solution would be to adjust
- inertia for random clustering (assuming the number of ground truth classes
- is known).
-
Adjusted Rand index
-------------------
diff --git a/doc/modules/linear_model.rst b/doc/modules/linear_model.rst
index 193e03677db94..f54860c7d03fc 100644
--- a/doc/modules/linear_model.rst
+++ b/doc/modules/linear_model.rst
@@ -268,11 +268,11 @@ They also tend to break when the problem is badly conditioned
Elastic Net
===========
-:class:`ElasticNet` is a linear model trained with L1 and L2 prior as
-regularizer. This combination allows for learning a sparse model where
+:class:`ElasticNet` is a linear regression model trained with L1 and L2 prior
+as regularizer. This combination allows for learning a sparse model where
few of the weights are non-zero like :class:`Lasso`, while still maintaining
-the regularization properties of :class:`Ridge`. We control this tradeoff
-using the `l1_ratio` parameter.
+the regularization properties of :class:`Ridge`. We control the convex
+combination of L1 and L2 using the `l1_ratio` parameter.
Elastic-net is useful when there are multiple features which are
correlated with one another. Lasso is likely to pick one of these
diff --git a/doc/tutorial/basic/tutorial.rst b/doc/tutorial/basic/tutorial.rst
index d25ae62da3a68..90616b1c48b83 100644
--- a/doc/tutorial/basic/tutorial.rst
+++ b/doc/tutorial/basic/tutorial.rst
@@ -86,7 +86,7 @@ datasets for classification and the `boston house prices dataset
A dataset is a dictionary-like object that holds all the data and some
metadata about the data. This data is stored in the ``.data`` member,
which is a ``n_samples, n_features`` array. In the case of supervised
-problem, explanatory variables are stored in the ``.target`` member. More
+problem, one or more response variables are stored in the ``.target`` member. More
details on the different datasets can be found in the :ref:`dedicated
section `.
diff --git a/doc/tutorial/statistical_inference/index.rst b/doc/tutorial/statistical_inference/index.rst
index 74d84dfdfe53b..95381a5d9cdeb 100644
--- a/doc/tutorial/statistical_inference/index.rst
+++ b/doc/tutorial/statistical_inference/index.rst
@@ -26,18 +26,6 @@ A tutorial on statistical-learning for scientific data processing
.. include:: ../../includes/big_toc_css.rst
-.. warning::
-
- In scikit-learn release 0.9, the import path has changed from
- `scikits.learn` to `sklearn`. To import with cross-version
- compatibility, use::
-
- try:
- from sklearn import something
- except ImportError:
- from scikits.learn import something
-
-
.. toctree::
:maxdepth: 2
@@ -47,4 +35,3 @@ A tutorial on statistical-learning for scientific data processing
unsupervised_learning
putting_together
finding_help
-
diff --git a/doc/tutorial/text_analytics/working_with_text_data.rst b/doc/tutorial/text_analytics/working_with_text_data.rst
index af769f6e4f401..3fe45fcbf597f 100644
--- a/doc/tutorial/text_analytics/working_with_text_data.rst
+++ b/doc/tutorial/text_analytics/working_with_text_data.rst
@@ -25,7 +25,7 @@ Tutorial setup
--------------
To get started with this tutorial, you firstly must have the
-*scikit-learn* and all of its requiered dependencies installed.
+*scikit-learn* and all of its required dependencies installed.
Please refer to the `scikit-learn install`_ page for more information
and for per-system instructions.
@@ -419,7 +419,7 @@ Instead of tweaking the parameters of the various components of the
chain, it is possible to run an exhaustive search of the best
parameters on a grid of possible values. We try out all classifiers
on either words or bigrams, with or without idf, and with a penalty
-parameter of either 100 or 1000 for the linear SVM::
+parameter of either 0.01 or 0.001 for the linear SVM::
>>> from sklearn.grid_search import GridSearchCV
>>> parameters = {'vect__ngram_range': [(1, 1), (1, 2)],
diff --git a/doc/whats_new.rst b/doc/whats_new.rst
index 16864820288f4..28b67737ddcb2 100644
--- a/doc/whats_new.rst
+++ b/doc/whats_new.rst
@@ -182,6 +182,11 @@ Changelog
:class:`cluster.WardAgglomeration` when no samples are given,
rather than returning meaningless clustering.
+ - Grid search and cross validation allow NaNs in the input arrays so that
+ preprocessors such as :class:`preprocessing.Imputer
+ ` can be trained within the cross validation loop,
+ avoiding potentially skewed results.
+
API changes summary
-------------------
diff --git a/examples/applications/face_recognition.py b/examples/applications/face_recognition.py
index 06fb3199a3e2b..541bbcf4551b6 100644
--- a/examples/applications/face_recognition.py
+++ b/examples/applications/face_recognition.py
@@ -54,7 +54,7 @@
# introspect the images arrays to find the shapes (for plotting)
n_samples, h, w = lfw_people.images.shape
-# fot machine learning we use the 2 data directly (as relative pixel
+# for machine learning we use the 2 data directly (as relative pixel
# positions info is ignored by this model)
X = lfw_people.data
n_features = X.shape[1]
diff --git a/examples/linear_model/plot_sgd_loss_functions.py b/examples/linear_model/plot_sgd_loss_functions.py
index 14adec0144d9a..e7a8b226037f6 100644
--- a/examples/linear_model/plot_sgd_loss_functions.py
+++ b/examples/linear_model/plot_sgd_loss_functions.py
@@ -1,53 +1,41 @@
"""
==========================
-SGD: Convex Loss Functions
+SGD: convex loss functions
==========================
-An example that compares various convex loss functions.
-
-
-All of the above loss functions are supported by
-:class:`sklearn.linear_model.stochastic_gradient` .
+A plot that compares the various convex loss functions supported by
+:class:`sklearn.linear_model.SGDClassifier` .
"""
print(__doc__)
import numpy as np
import pylab as pl
-from sklearn.linear_model.sgd_fast import SquaredHinge
-from sklearn.linear_model.sgd_fast import Hinge
-from sklearn.linear_model.sgd_fast import ModifiedHuber
-from sklearn.linear_model.sgd_fast import SquaredLoss
-###############################################################################
-# Define loss functions
-xmin, xmax = -4, 4
-hinge = Hinge(1)
-squared_hinge = SquaredHinge()
-perceptron = Hinge(0)
-log_loss = lambda z, p: np.log2(1.0 + np.exp(-z))
-modified_huber = ModifiedHuber()
-squared_loss = SquaredLoss()
+def modified_huber_loss(y_true, y_pred):
+ z = y_pred * y_true
+ loss = -4 * z
+ loss[z >= -1] = (1 - z[z >= -1]) ** 2
+ loss[z >= 1.] = 0
+ return loss
-###############################################################################
-# Plot loss funcitons
+
+xmin, xmax = -4, 4
xx = np.linspace(xmin, xmax, 100)
pl.plot([xmin, 0, 0, xmax], [1, 1, 0, 0], 'k-',
label="Zero-one loss")
-pl.plot(xx, [hinge.loss(x, 1) for x in xx], 'g-',
+pl.plot(xx, np.where(xx < 1, 1 - xx, 0), 'g-',
label="Hinge loss")
-pl.plot(xx, [perceptron.loss(x, 1) for x in xx], 'm-',
+pl.plot(xx, -np.minimum(xx, 0), 'm-',
label="Perceptron loss")
-pl.plot(xx, [log_loss(x, 1) for x in xx], 'r-',
+pl.plot(xx, np.log2(1 + np.exp(-xx)), 'r-',
label="Log loss")
-#pl.plot(xx, [2 * squared_loss.loss(x, 1) for x in xx], 'c-',
-# label="Squared loss")
-pl.plot(xx, [squared_hinge.loss(x, 1) for x in xx], 'b-',
+pl.plot(xx, np.where(xx < 1, 1 - xx, 0) ** 2, 'b-',
label="Squared hinge loss")
-pl.plot(xx, [modified_huber.loss(x, 1) for x in xx], 'y--',
- label="Modified huber loss")
+pl.plot(xx, modified_huber_loss(xx, 1), 'y--',
+ label="Modified Huber loss")
pl.ylim((0, 8))
pl.legend(loc="upper right")
-pl.xlabel(r"$y \cdot f(x)$")
+pl.xlabel(r"Decision function $f(x)$")
pl.ylabel("$L(y, f(x))$")
pl.show()
diff --git a/setup.py b/setup.py
index 9ffd06c2dcd48..9c538fa0a1b9a 100755
--- a/setup.py
+++ b/setup.py
@@ -120,6 +120,7 @@ def setup_package():
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
+ 'Programming Language :: Python :: 3.4',
],
cmdclass={'clean': CleanCommand},
**extra_setuptools_args)
diff --git a/sklearn/cluster/affinity_propagation_.py b/sklearn/cluster/affinity_propagation_.py
index 90c0ad8f54f1a..5c1d7de86d5ed 100644
--- a/sklearn/cluster/affinity_propagation_.py
+++ b/sklearn/cluster/affinity_propagation_.py
@@ -22,10 +22,10 @@ def affinity_propagation(S, preference=None, convergence_iter=15, max_iter=200,
Parameters
----------
- S : array [n_samples, n_samples]
+ S : array-like, shape (n_samples, n_samples)
Matrix of similarities between points
- preference : array [n_samples,] or float, optional, default: None
+ preference : array-like, shape (n_samples,) or float, optional
Preferences for each point - points with larger values of
preferences are more likely to be chosen as exemplars. The number of
exemplars, i.e. of clusters, is influenced by the input preferences
@@ -54,10 +54,10 @@ def affinity_propagation(S, preference=None, convergence_iter=15, max_iter=200,
Returns
-------
- cluster_centers_indices : array [n_clusters]
+ cluster_centers_indices : array, shape (n_clusters,)
index of clusters centers
- labels : array [n_samples]
+ labels : array, shape (n_samples,)
cluster labels for each point
Notes
@@ -191,7 +191,7 @@ class AffinityPropagation(BaseEstimator, ClusterMixin):
copy : boolean, optional, default: True
Make a copy of input data.
- preference : array [n_samples,] or float, optional, default: None
+ preference : array-like, shape (n_samples,) or float, optional
Preferences for each point - points with larger values of
preferences are more likely to be chosen as exemplars. The number
of exemplars, ie of clusters, is influenced by the input
@@ -209,16 +209,16 @@ class AffinityPropagation(BaseEstimator, ClusterMixin):
Attributes
----------
- `cluster_centers_indices_` : array, [n_clusters]
+ `cluster_centers_indices_` : array, shape (n_clusters,)
Indices of cluster centers
- `cluster_centers_` : array, [n_clusters, n_features]
+ `cluster_centers_` : array, shape (n_clusters, n_features)
Cluster centers (if affinity != ``precomputed'').
- `labels_` : array, [n_samples]
+ `labels_` : array, shape (n_samples,)
Labels of each point
- `affinity_matrix_` : array-like, [n_samples, n_samples]
+ `affinity_matrix_` : array, shape (n_samples, n_samples)
Stores the affinity matrix used in ``fit``.
Notes
@@ -258,7 +258,7 @@ def fit(self, X):
Parameters
----------
- X: array [n_samples, n_features] or [n_samples, n_samples]
+ X: array-like, shape (n_samples, n_features) or (n_samples, n_samples)
Data matrix or, if affinity is ``precomputed``, matrix of
similarities / affinities.
"""
@@ -287,12 +287,12 @@ def predict(self, X):
Parameters
----------
- X : {array-like, sparse matrix}, shape = [n_samples, n_features]
+ X : {array-like, sparse matrix}, shape (n_samples, n_features)
New data to predict.
Returns
-------
- labels : array, shape [n_samples,]
+ labels : array, shape (n_samples,)
Index of the cluster each sample belongs to.
"""
if not hasattr(self, "cluster_centers_indices_"):
diff --git a/sklearn/cluster/hierarchical.py b/sklearn/cluster/hierarchical.py
index effe582b0dd9b..69a469838a747 100644
--- a/sklearn/cluster/hierarchical.py
+++ b/sklearn/cluster/hierarchical.py
@@ -13,7 +13,6 @@
import numpy as np
from scipy import sparse
-from scipy.cluster import hierarchy
from ..base import BaseEstimator, ClusterMixin
from ..externals.joblib import Memory
@@ -150,6 +149,8 @@ def ward_tree(X, connectivity=None, n_components=None, copy=None,
n_samples, n_features = X.shape
if connectivity is None:
+ from scipy.cluster import hierarchy # imports PIL
+
if n_clusters is not None:
warnings.warn('Partial build of the tree is implemented '
'only for structured clustering (i.e. with '
@@ -332,6 +333,8 @@ def linkage_tree(X, connectivity=None, n_components=None,
'of %s, but %s was given' % (linkage_choices.keys(), linkage))
if connectivity is None:
+ from scipy.cluster import hierarchy # imports PIL
+
if n_clusters is not None:
warnings.warn('Partial build of the tree is implemented '
'only for structured clustering (i.e. with '
diff --git a/sklearn/cluster/mean_shift_.py b/sklearn/cluster/mean_shift_.py
index 725298c8ed4a8..1993045dea4a4 100644
--- a/sklearn/cluster/mean_shift_.py
+++ b/sklearn/cluster/mean_shift_.py
@@ -1,6 +1,6 @@
-"""Mean Shift clustering algorithm
+"""Mean shift clustering algorithm.
-MeanShift clustering aims to discover *blobs* in a smooth density of
+Mean shift clustering aims to discover *blobs* in a smooth density of
samples. It is a centroid based algorithm, which works by updating candidates
for centroids to be the mean of the points within a given region. These
candidates are then filtered in a post-processing stage to eliminate
@@ -31,7 +31,7 @@ def estimate_bandwidth(X, quantile=0.3, n_samples=None, random_state=0):
Parameters
----------
- X : array [n_samples, n_features]
+ X : array-like, shape=[n_samples, n_features]
Input points.
quantile : float, default 0.3
@@ -66,20 +66,12 @@ def estimate_bandwidth(X, quantile=0.3, n_samples=None, random_state=0):
def mean_shift(X, bandwidth=None, seeds=None, bin_seeding=False,
min_bin_freq=1, cluster_all=True, max_iterations=300):
- """Perform MeanShift Clustering of data using a flat kernel
-
- MeanShift clustering aims to discover *blobs* in a smooth density of
- samples. It is a centroid based algorithm, which works by updating candidates
- for centroids to be the mean of the points within a given region. These
- candidates are then filtered in a post-processing stage to eliminate
- near-duplicates to form the final set of centroids.
-
- Seeding is performed using a binning technique for scalability.
+ """Perform mean shift clustering of data using a flat kernel.
Parameters
----------
- X : array-like shape=[n_samples, n_features]
+ X : array-like, shape=[n_samples, n_features]
Input data.
bandwidth : float, optional
@@ -90,7 +82,7 @@ def mean_shift(X, bandwidth=None, seeds=None, bin_seeding=False,
the number of samples. The sklearn.cluster.estimate_bandwidth function
can be used to do this more efficiently.
- seeds : array [n_seeds, n_features]
+ seeds : array-like, shape=[n_seeds, n_features]
Point used as initial kernel locations.
bin_seeding : boolean
@@ -109,10 +101,10 @@ def mean_shift(X, bandwidth=None, seeds=None, bin_seeding=False,
Returns
-------
- cluster_centers : array [n_clusters, n_features]
+ cluster_centers : array, shape=[n_clusters, n_features]
Coordinates of cluster centers.
- labels : array [n_samples]
+ labels : array, shape=[n_samples]
Cluster labels for each point.
Notes
@@ -182,7 +174,7 @@ def mean_shift(X, bandwidth=None, seeds=None, bin_seeding=False,
def get_bin_seeds(X, bin_size, min_bin_freq=1):
- """Finds seeds for mean_shift
+ """Finds seeds for mean_shift.
Finds seeds by first binning data onto a grid whose lines are
spaced bin_size apart, and then choosing those bins with at least
@@ -225,7 +217,15 @@ def get_bin_seeds(X, bin_size, min_bin_freq=1):
class MeanShift(BaseEstimator, ClusterMixin):
- """MeanShift clustering
+ """Mean shift clustering using a flat kernel.
+
+ Mean shift clustering aims to discover "blobs" in a smooth density of
+ samples. It is a centroid-based algorithm, which works by updating
+ candidates for centroids to be the mean of the points within a given
+ region. These candidates are then filtered in a post-processing stage to
+ eliminate near-duplicates to form the final set of centroids.
+
+ Seeding is performed using a binning technique for scalability.
Parameters
----------
@@ -236,7 +236,7 @@ class MeanShift(BaseEstimator, ClusterMixin):
sklearn.cluster.estimate_bandwidth; see the documentation for that
function for hints on scalability (see also the Notes, below).
- seeds : array [n_samples, n_features], optional
+ seeds : array, shape=[n_samples, n_features], optional
Seeds used to initialize kernels. If not set,
the seeds are calculated by clustering.get_bin_seeds
with bandwidth as the grid size and default values for
@@ -321,7 +321,7 @@ def predict(self, X):
Parameters
----------
- X : {array-like, sparse matrix}, shape = [n_samples, n_features]
+ X : {array-like, sparse matrix}, shape=[n_samples, n_features]
New data to predict.
Returns
diff --git a/sklearn/cluster/tests/test_hierarchical.py b/sklearn/cluster/tests/test_hierarchical.py
index 063f9bcf6c900..2e9ff88fc53d8 100644
--- a/sklearn/cluster/tests/test_hierarchical.py
+++ b/sklearn/cluster/tests/test_hierarchical.py
@@ -33,11 +33,10 @@
def test_linkage_misc():
# Misc tests on linkage
- X = np.ones((5, 5))
- assert_raises(ValueError,
- AgglomerativeClustering(linkage='foobar').fit,
- X)
- assert_raises(ValueError, linkage_tree, X, linkage='foobar')
+ rnd = np.random.RandomState(42)
+ X = rnd.normal(size=(5, 5))
+ assert_raises(ValueError, AgglomerativeClustering(linkage='foo').fit, X)
+ assert_raises(ValueError, linkage_tree, X, linkage='foo')
assert_raises(ValueError, linkage_tree, X, connectivity=np.ones((4, 4)))
# Smoke test FeatureAgglomeration
@@ -96,10 +95,8 @@ def test_unstructured_linkage_tree():
# raising a warning and testing the warning code
with warnings.catch_warnings(record=True) as warning_list:
warnings.simplefilter("ignore", DeprecationWarning)
- children, n_nodes, n_leaves, parent = assert_warns(UserWarning,
- ward_tree,
- this_X.T,
- n_clusters=10)
+ children, n_nodes, n_leaves, parent = assert_warns(
+ UserWarning, ward_tree, this_X.T, n_clusters=10)
n_nodes = 2 * X.shape[1] - 1
assert_equal(len(children) + n_leaves, n_nodes)
@@ -156,8 +153,8 @@ def test_agglomerative_clustering():
labels = clustering.labels_
assert_true(np.size(np.unique(labels)) == 10)
# Turn caching off now
- clustering = AgglomerativeClustering(n_clusters=10,
- connectivity=connectivity, linkage=linkage)
+ clustering = AgglomerativeClustering(
+ n_clusters=10, connectivity=connectivity, linkage=linkage)
# Check that we obtain the same solution with early-stopping of the
# tree building
clustering.compute_full_tree = False
@@ -212,8 +209,11 @@ def test_ward_agglomeration():
X = rnd.randn(50, 100)
connectivity = grid_to_graph(*mask.shape)
assert_warns(DeprecationWarning, WardAgglomeration)
- ward = WardAgglomeration(n_clusters=5, connectivity=connectivity)
- ward.fit(X)
+ with warnings.catch_warnings(record=True) as warning_list:
+ warnings.simplefilter("always", DeprecationWarning)
+ ward = WardAgglomeration(n_clusters=5, connectivity=connectivity)
+ ward.fit(X)
+ assert_equal(len(warning_list), 1)
agglo = FeatureAgglomeration(n_clusters=5, connectivity=connectivity)
agglo.fit(X)
assert_array_equal(agglo.labels_, ward.labels_)
@@ -283,7 +283,8 @@ def test_connectivity_popagation():
(.018, .152), (.018, .149), (.018, .144),
])
connectivity = kneighbors_graph(X, 10)
- ward = Ward(n_clusters=4, connectivity=connectivity)
+ ward = AgglomerativeClustering(
+ n_clusters=4, connectivity=connectivity, linkage='ward')
# If changes are not propagated correctly, fit crashes with an
# IndexError
ward.fit(X)
@@ -299,7 +300,7 @@ def test_connectivity_fixing_non_lil():
# create a mask with several components to force connectivity fixing
m = np.array([[True, False], [False, True]])
c = grid_to_graph(n_x=2, n_y=2, mask=m)
- w = Ward(connectivity=c)
+ w = AgglomerativeClustering(connectivity=c, linkage='ward')
assert_warns(UserWarning, w.fit, x)
diff --git a/sklearn/cluster/tests/test_mean_shift.py b/sklearn/cluster/tests/test_mean_shift.py
index a64a21775a071..debe9d469495a 100644
--- a/sklearn/cluster/tests/test_mean_shift.py
+++ b/sklearn/cluster/tests/test_mean_shift.py
@@ -18,13 +18,13 @@
n_clusters = 3
centers = np.array([[1, 1], [-1, -1], [1, -1]]) + 10
-X, _ = make_blobs(n_samples=500, n_features=2, centers=centers,
- cluster_std=0.4, shuffle=True, random_state=0)
+X, _ = make_blobs(n_samples=300, n_features=2, centers=centers,
+ cluster_std=0.4, shuffle=True, random_state=11)
def test_estimate_bandwidth():
"""Test estimate_bandwidth"""
- bandwidth = estimate_bandwidth(X, n_samples=300)
+ bandwidth = estimate_bandwidth(X, n_samples=200)
assert_true(0.9 <= bandwidth <= 1.5)
diff --git a/sklearn/cluster/tests/test_spectral.py b/sklearn/cluster/tests/test_spectral.py
index a79b19582b3ec..4c73713f1eff8 100644
--- a/sklearn/cluster/tests/test_spectral.py
+++ b/sklearn/cluster/tests/test_spectral.py
@@ -52,28 +52,6 @@ def test_spectral_clustering():
assert_array_equal(model_copy.labels_, model.labels_)
-def test_spectral_lobpcg_mode():
- # Test the lobpcg mode of SpectralClustering
- # We need a fairly big data matrix, as lobpcg does not work with
- # small data matrices
- centers = np.array([
- [0., 0.],
- [10., 10.],
- ])
- # The cluster_std parameter has been selected to have the blob close enough
- # to get stable results both with the ATLAS and the reference
- # implementations of LAPACK.
- X, true_labels = make_blobs(n_samples=300, centers=centers,
- cluster_std=20.0, random_state=42)
- D = pairwise_distances(X) # Distance matrix
- S = np.max(D) - D # Similarity matrix
- labels = spectral_clustering(S, n_clusters=len(centers),
- random_state=0, eigen_solver="lobpcg")
- # We don't care too much that it's good, just that it *worked*.
- # There does have to be some lower limit on the performance though.
- assert_greater(np.mean(labels == true_labels), .3)
-
-
def test_spectral_amg_mode():
# Test the amg mode of SpectralClustering
centers = np.array([
diff --git a/sklearn/covariance/robust_covariance.py b/sklearn/covariance/robust_covariance.py
index 435fc8a1de358..ae04e41c29f62 100644
--- a/sklearn/covariance/robust_covariance.py
+++ b/sklearn/covariance/robust_covariance.py
@@ -23,6 +23,8 @@
# (A Fast Algorithm for the Minimum Covariance Determinant Estimator,
# 1999, American Statistical Association and the American Society
# for Quality, TECHNOMETRICS)
+# XXX Is this really a public function? It's not listed in the docs or
+# exported by sklearn.covariance. Deprecate?
def c_step(X, n_support, remaining_iterations=30, initial_estimates=None,
verbose=False, cov_computation_method=empirical_covariance,
random_state=None):
@@ -76,16 +78,24 @@ def c_step(X, n_support, remaining_iterations=30, initial_estimates=None,
Society for Quality, TECHNOMETRICS
"""
+ X = np.asarray(X)
random_state = check_random_state(random_state)
+ return _c_step(X, n_support, remaining_iterations=remaining_iterations,
+ initial_estimates=initial_estimates, verbose=verbose,
+ cov_computation_method=cov_computation_method,
+ random_state=random_state)
+
+
+def _c_step(X, n_support, random_state, remaining_iterations=30,
+ initial_estimates=None, verbose=False,
+ cov_computation_method=empirical_covariance):
n_samples, n_features = X.shape
# Initialisation
+ support = np.zeros(n_samples, dtype=bool)
if initial_estimates is None:
# compute initial robust estimates from a random subset
- support = np.zeros(n_samples).astype(bool)
support[random_state.permutation(n_samples)[:n_support]] = True
- location = X[support].mean(0)
- covariance = cov_computation_method(X[support])
else:
# get initial robust estimates from the function parameters
location = initial_estimates[0]
@@ -95,14 +105,15 @@ def c_step(X, n_support, remaining_iterations=30, initial_estimates=None,
X_centered = X - location
dist = (np.dot(X_centered, precision) * X_centered).sum(1)
# compute new estimates
- support = np.zeros(n_samples).astype(bool)
support[np.argsort(dist)[:n_support]] = True
- location = X[support].mean(0)
- covariance = cov_computation_method(X[support])
- previous_det = np.inf
+
+ X_support = X[support]
+ location = X_support.mean(0)
+ covariance = cov_computation_method(X_support)
# Iterative procedure for Minimum Covariance Determinant computation
det = fast_logdet(covariance)
+ previous_det = np.inf
while (det < previous_det) and (remaining_iterations > 0):
# save old estimates values
previous_location = location
@@ -114,10 +125,11 @@ def c_step(X, n_support, remaining_iterations=30, initial_estimates=None,
X_centered = X - location
dist = (np.dot(X_centered, precision) * X_centered).sum(axis=1)
# compute new estimates
- support = np.zeros(n_samples).astype(bool)
+ support = np.zeros(n_samples, dtype=bool)
support[np.argsort(dist)[:n_support]] = True
- location = X[support].mean(axis=0)
- covariance = cov_computation_method(X[support])
+ X_support = X[support]
+ location = X_support.mean(axis=0)
+ covariance = cov_computation_method(X_support)
det = fast_logdet(covariance)
# update remaining iterations for early stopping
remaining_iterations -= 1
@@ -150,7 +162,6 @@ def c_step(X, n_support, remaining_iterations=30, initial_estimates=None,
if remaining_iterations == 0:
if verbose:
print('Maximum number of iterations reached')
- det = fast_logdet(covariance)
results = location, covariance, det, support, dist
return results
@@ -247,7 +258,7 @@ def select_candidates(X, n_support, n_trials, select=1, n_iter=30,
# perform `n_trials` computations from random initial supports
for j in range(n_trials):
all_estimates.append(
- c_step(
+ _c_step(
X, n_support, remaining_iterations=n_iter, verbose=verbose,
cov_computation_method=cov_computation_method,
random_state=random_state))
@@ -255,7 +266,7 @@ def select_candidates(X, n_support, n_trials, select=1, n_iter=30,
# perform computations from every given initial estimates
for j in range(n_trials):
initial_estimates = (estimates_list[0][j], estimates_list[1][j])
- all_estimates.append(c_step(
+ all_estimates.append(_c_step(
X, n_support, remaining_iterations=n_iter,
initial_estimates=initial_estimates, verbose=verbose,
cov_computation_method=cov_computation_method,
@@ -361,7 +372,7 @@ def fast_mcd(X, support_fraction=None,
+ X_sorted[halves_start]).mean()
support = np.zeros(n_samples, dtype=bool)
X_centered = X - location
- support[np.argsort(np.abs(X - location), 0)[:n_support]] = True
+ support[np.argsort(np.abs(X_centered), 0)[:n_support]] = True
covariance = np.asarray([[np.var(X[support])]])
location = np.array([location])
# get precision matrix in an optimized way
diff --git a/sklearn/cross_validation.py b/sklearn/cross_validation.py
index 03952a2c6664f..b61be5ce46e83 100644
--- a/sklearn/cross_validation.py
+++ b/sklearn/cross_validation.py
@@ -1097,7 +1097,8 @@ def cross_val_score(estimator, X, y=None, scoring=None, cv=None, n_jobs=1,
scores : array of float, shape=(len(list(cv)),)
Array of scores of the estimator for each run of the cross validation.
"""
- X, y = check_arrays(X, y, sparse_format='csr', allow_lists=True)
+ X, y = check_arrays(X, y, sparse_format='csr', allow_lists=True,
+ allow_nans=True)
if y is not None:
y = np.asarray(y)
@@ -1408,7 +1409,7 @@ def permutation_test_score(estimator, X, y, score_func=None, cv=None,
vol. 11
"""
- X, y = check_arrays(X, y, sparse_format='csr')
+ X, y = check_arrays(X, y, sparse_format='csr', allow_nans=True)
cv = _check_cv(cv, X, y, classifier=is_classifier(estimator))
scorer = check_scoring(estimator, scoring=scoring, score_func=score_func)
random_state = check_random_state(random_state)
@@ -1505,6 +1506,7 @@ def train_test_split(*arrays, **options):
train_size = options.pop('train_size', None)
random_state = options.pop('random_state', None)
options['sparse_format'] = 'csr'
+ options['allow_nans'] = True
if test_size is None and train_size is None:
test_size = 0.25
diff --git a/sklearn/decomposition/factor_analysis.py b/sklearn/decomposition/factor_analysis.py
index 5bc06a23838f0..9bf10330f47bc 100644
--- a/sklearn/decomposition/factor_analysis.py
+++ b/sklearn/decomposition/factor_analysis.py
@@ -28,7 +28,7 @@
from ..base import BaseEstimator, TransformerMixin
from ..externals.six.moves import xrange
from ..utils import array2d, check_arrays, check_random_state
-from ..utils.extmath import fast_logdet, fast_dot, randomized_svd
+from ..utils.extmath import fast_logdet, fast_dot, randomized_svd, squared_norm
from ..utils import ConvergenceWarning
@@ -188,7 +188,7 @@ def fit(self, X, y=None):
def my_svd(X):
_, s, V = linalg.svd(X, full_matrices=False)
return (s[:n_components], V[:n_components],
- np.dot(s[n_components:].flat, s[n_components:].flat))
+ squared_norm(s[n_components:]))
elif self.svd_method == 'randomized':
random_state = check_random_state(self.random_state)
@@ -196,7 +196,7 @@ def my_svd(X):
_, s, V = randomized_svd(X, n_components,
random_state=random_state,
n_iter=self.iterated_power)
- return s, V, np.dot(X.flat, X.flat) - np.dot(s, s)
+ return s, V, squared_norm(X) - squared_norm(s)
else:
raise ValueError('SVD method %s is not supported. Please consider'
' the documentation' % self.svd_method)
diff --git a/sklearn/decomposition/nmf.py b/sklearn/decomposition/nmf.py
index 2ebdbb702fe32..2f6f12c9bb018 100644
--- a/sklearn/decomposition/nmf.py
+++ b/sklearn/decomposition/nmf.py
@@ -20,7 +20,7 @@
from ..base import BaseEstimator, TransformerMixin
from ..utils import atleast2d_or_csr, check_random_state, check_arrays
-from ..utils.extmath import randomized_svd, safe_sparse_dot
+from ..utils.extmath import randomized_svd, safe_sparse_dot, squared_norm
def safe_vstack(Xs):
@@ -35,8 +35,7 @@ def norm(x):
See: http://fseoane.net/blog/2011/computing-the-vector-norm/
"""
- x = x.ravel()
- return np.sqrt(np.dot(x, x))
+ return sqrt(squared_norm(x))
def trace_dot(X, Y):
diff --git a/sklearn/ensemble/_gradient_boosting.c b/sklearn/ensemble/_gradient_boosting.c
index e7ce49f842778..5dc4e417a63d5 100644
--- a/sklearn/ensemble/_gradient_boosting.c
+++ b/sklearn/ensemble/_gradient_boosting.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.20 on Thu Mar 20 14:03:19 2014 */
+/* Generated by Cython 0.20.1 on Sat Apr 12 13:35:30 2014 */
#define PY_SSIZE_T_CLEAN
#ifndef CYTHON_USE_PYLONG_INTERNALS
@@ -19,7 +19,7 @@
#elif PY_VERSION_HEX < 0x02040000
#error Cython requires Python 2.4+.
#else
-#define CYTHON_ABI "0_20"
+#define CYTHON_ABI "0_20_1"
#include /* For offsetof */
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
@@ -116,7 +116,7 @@
#if PY_MAJOR_VERSION < 3
#define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
- PyCode_New(a, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#define __Pyx_DefaultClassType PyClass_Type
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
@@ -161,10 +161,16 @@
#define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
#define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
#endif
+#if CYTHON_COMPILING_IN_PYPY
+ #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
+ #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
+#else
+ #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
+ #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
+ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
+#endif
#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
-#define __Pyx_PyUnicode_Concat(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
- PyNumber_Add(a, b) : PyUnicode_Concat(a, b))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
#else
@@ -231,7 +237,7 @@
#if PY_MAJOR_VERSION >= 3
#define PyBoolObject PyLongObject
#endif
-#if PY_VERSION_HEX < 0x03020000
+#if PY_VERSION_HEX < 0x030200A4
typedef long Py_hash_t;
#define __Pyx_PyInt_FromHash_t PyInt_FromLong
#define __Pyx_PyInt_AsHash_t PyInt_AsLong
@@ -645,7 +651,7 @@ typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
#endif
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":723
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":723
* # in Cython to enable them only on the right systems.
*
* ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
@@ -654,7 +660,7 @@ typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
*/
typedef npy_int8 __pyx_t_5numpy_int8_t;
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":724
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":724
*
* ctypedef npy_int8 int8_t
* ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
@@ -663,7 +669,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t;
*/
typedef npy_int16 __pyx_t_5numpy_int16_t;
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":725
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":725
* ctypedef npy_int8 int8_t
* ctypedef npy_int16 int16_t
* ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
@@ -672,7 +678,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t;
*/
typedef npy_int32 __pyx_t_5numpy_int32_t;
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":726
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":726
* ctypedef npy_int16 int16_t
* ctypedef npy_int32 int32_t
* ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
@@ -681,7 +687,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t;
*/
typedef npy_int64 __pyx_t_5numpy_int64_t;
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":730
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":730
* #ctypedef npy_int128 int128_t
*
* ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
@@ -690,7 +696,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t;
*/
typedef npy_uint8 __pyx_t_5numpy_uint8_t;
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":731
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":731
*
* ctypedef npy_uint8 uint8_t
* ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
@@ -699,7 +705,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t;
*/
typedef npy_uint16 __pyx_t_5numpy_uint16_t;
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":732
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":732
* ctypedef npy_uint8 uint8_t
* ctypedef npy_uint16 uint16_t
* ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
@@ -708,7 +714,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t;
*/
typedef npy_uint32 __pyx_t_5numpy_uint32_t;
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":733
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":733
* ctypedef npy_uint16 uint16_t
* ctypedef npy_uint32 uint32_t
* ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
@@ -717,7 +723,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t;
*/
typedef npy_uint64 __pyx_t_5numpy_uint64_t;
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":737
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":737
* #ctypedef npy_uint128 uint128_t
*
* ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
@@ -726,7 +732,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t;
*/
typedef npy_float32 __pyx_t_5numpy_float32_t;
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":738
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":738
*
* ctypedef npy_float32 float32_t
* ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
@@ -735,7 +741,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t;
*/
typedef npy_float64 __pyx_t_5numpy_float64_t;
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":747
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":747
* # The int types are mapped a bit surprising --
* # numpy.int corresponds to 'l' and numpy.long to 'q'
* ctypedef npy_long int_t # <<<<<<<<<<<<<<
@@ -744,7 +750,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t;
*/
typedef npy_long __pyx_t_5numpy_int_t;
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":748
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":748
* # numpy.int corresponds to 'l' and numpy.long to 'q'
* ctypedef npy_long int_t
* ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
@@ -753,7 +759,7 @@ typedef npy_long __pyx_t_5numpy_int_t;
*/
typedef npy_longlong __pyx_t_5numpy_long_t;
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":749
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":749
* ctypedef npy_long int_t
* ctypedef npy_longlong long_t
* ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
@@ -762,7 +768,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t;
*/
typedef npy_longlong __pyx_t_5numpy_longlong_t;
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":751
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":751
* ctypedef npy_longlong longlong_t
*
* ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
@@ -771,7 +777,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t;
*/
typedef npy_ulong __pyx_t_5numpy_uint_t;
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":752
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":752
*
* ctypedef npy_ulong uint_t
* ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
@@ -780,7 +786,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t;
*/
typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":753
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":753
* ctypedef npy_ulong uint_t
* ctypedef npy_ulonglong ulong_t
* ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
@@ -789,7 +795,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
*/
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":755
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":755
* ctypedef npy_ulonglong ulonglong_t
*
* ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
@@ -798,7 +804,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
*/
typedef npy_intp __pyx_t_5numpy_intp_t;
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":756
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":756
*
* ctypedef npy_intp intp_t
* ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
@@ -807,7 +813,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t;
*/
typedef npy_uintp __pyx_t_5numpy_uintp_t;
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":758
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":758
* ctypedef npy_uintp uintp_t
*
* ctypedef npy_double float_t # <<<<<<<<<<<<<<
@@ -816,7 +822,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t;
*/
typedef npy_double __pyx_t_5numpy_float_t;
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":759
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":759
*
* ctypedef npy_double float_t
* ctypedef npy_double double_t # <<<<<<<<<<<<<<
@@ -825,7 +831,7 @@ typedef npy_double __pyx_t_5numpy_float_t;
*/
typedef npy_double __pyx_t_5numpy_double_t;
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":760
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":760
* ctypedef npy_double float_t
* ctypedef npy_double double_t
* ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
@@ -945,16 +951,16 @@ typedef npy_intp __pyx_t_7sklearn_8ensemble_18_gradient_boosting_SIZE_t;
/*--- Type declarations ---*/
-struct __pyx_MemviewEnum_obj;
+struct __pyx_obj_7sklearn_4tree_5_tree_Criterion;
+struct __pyx_obj_7sklearn_4tree_5_tree_Splitter;
+struct __pyx_obj_7sklearn_4tree_5_tree_Tree;
struct __pyx_obj_7sklearn_4tree_5_tree_TreeBuilder;
+struct __pyx_array_obj;
+struct __pyx_MemviewEnum_obj;
struct __pyx_memoryview_obj;
-struct __pyx_obj_7sklearn_4tree_5_tree_Splitter;
-struct __pyx_obj_7sklearn_4tree_5_tree_Criterion;
struct __pyx_memoryviewslice_obj;
-struct __pyx_array_obj;
-struct __pyx_obj_7sklearn_4tree_5_tree_Tree;
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":762
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":762
* ctypedef npy_longdouble longdouble_t
*
* ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
@@ -963,7 +969,7 @@ struct __pyx_obj_7sklearn_4tree_5_tree_Tree;
*/
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":763
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":763
*
* ctypedef npy_cfloat cfloat_t
* ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
@@ -972,7 +978,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
*/
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":764
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":764
* ctypedef npy_cfloat cfloat_t
* ctypedef npy_cdouble cdouble_t
* ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
@@ -981,7 +987,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
*/
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":766
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":766
* ctypedef npy_clongdouble clongdouble_t
*
* ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
@@ -994,12 +1000,12 @@ struct __pyx_opt_args_7sklearn_4tree_5_tree_4Tree__resize_c;
struct __pyx_opt_args_7sklearn_4tree_5_tree_4Tree_compute_feature_importances;
struct __pyx_opt_args_7sklearn_4tree_5_tree_11TreeBuilder_build;
-/* "sklearn/tree/_tree.pxd":125
- * # Tree
+/* "sklearn/tree/_tree.pxd":139
* # =============================================================================
+ *
* cdef struct Node: # <<<<<<<<<<<<<<
- * # The main storage for Tree, excluding values at each node, which are
- * # stored separately as their size is not known at compile time.
+ * # Base storage structure for the nodes in a Tree object
+ *
*/
struct __pyx_t_7sklearn_4tree_5_tree_Node {
__pyx_t_7sklearn_4tree_5_tree_SIZE_t left_child;
@@ -1007,11 +1013,11 @@ struct __pyx_t_7sklearn_4tree_5_tree_Node {
__pyx_t_7sklearn_4tree_5_tree_SIZE_t feature;
__pyx_t_7sklearn_4tree_5_tree_DOUBLE_t threshold;
__pyx_t_7sklearn_4tree_5_tree_DOUBLE_t impurity;
- __pyx_t_7sklearn_4tree_5_tree_SIZE_t n_samples;
- __pyx_t_7sklearn_4tree_5_tree_DOUBLE_t weighted_n_samples;
+ __pyx_t_7sklearn_4tree_5_tree_SIZE_t n_node_samples;
+ __pyx_t_7sklearn_4tree_5_tree_DOUBLE_t weighted_n_node_samples;
};
-/* "sklearn/tree/_tree.pxd":161
+/* "sklearn/tree/_tree.pxd":176
* double weighted_n_samples) nogil
* cdef void _resize(self, SIZE_t capacity)
* cdef int _resize_c(self, SIZE_t capacity=*) nogil # <<<<<<<<<<<<<<
@@ -1023,7 +1029,7 @@ struct __pyx_opt_args_7sklearn_4tree_5_tree_4Tree__resize_c {
__pyx_t_7sklearn_4tree_5_tree_SIZE_t capacity;
};
-/* "sklearn/tree/_tree.pxd":168
+/* "sklearn/tree/_tree.pxd":183
* cpdef np.ndarray predict(self, np.ndarray[DTYPE_t, ndim=2] X)
* cpdef np.ndarray apply(self, np.ndarray[DTYPE_t, ndim=2] X)
* cpdef compute_feature_importances(self, normalize=*) # <<<<<<<<<<<<<<
@@ -1035,7 +1041,7 @@ struct __pyx_opt_args_7sklearn_4tree_5_tree_4Tree_compute_feature_importances {
PyObject *normalize;
};
-/* "sklearn/tree/_tree.pxd":181
+/* "sklearn/tree/_tree.pxd":204
* cdef SIZE_t max_depth # Maximal tree depth
*
* cpdef build(self, Tree tree, np.ndarray X, np.ndarray y, # <<<<<<<<<<<<<<
@@ -1046,65 +1052,38 @@ struct __pyx_opt_args_7sklearn_4tree_5_tree_11TreeBuilder_build {
PyArrayObject *sample_weight;
};
-/* "View.MemoryView":275
- *
- * @cname('__pyx_MemviewEnum')
- * cdef class Enum(object): # <<<<<<<<<<<<<<
- * cdef object name
- * def __init__(self, name):
- */
-struct __pyx_MemviewEnum_obj {
- PyObject_HEAD
- PyObject *name;
-};
-
-
-/* "sklearn/tree/_tree.pxd":174
- * # Tree builder
+/* "sklearn/tree/_tree.pxd":25
* # =============================================================================
- * cdef class TreeBuilder: # <<<<<<<<<<<<<<
- * cdef Splitter splitter # Splitting algorithm
*
+ * cdef class Criterion: # <<<<<<<<<<<<<<
+ * # The criterion computes the impurity of a node and the reduction of
+ * # impurity of a split on that node. It also computes the output statistics
*/
-struct __pyx_obj_7sklearn_4tree_5_tree_TreeBuilder {
- PyObject_HEAD
- struct __pyx_vtabstruct_7sklearn_4tree_5_tree_TreeBuilder *__pyx_vtab;
- struct __pyx_obj_7sklearn_4tree_5_tree_Splitter *splitter;
- __pyx_t_7sklearn_4tree_5_tree_SIZE_t min_samples_split;
- __pyx_t_7sklearn_4tree_5_tree_SIZE_t min_samples_leaf;
- __pyx_t_7sklearn_4tree_5_tree_SIZE_t max_depth;
-};
-
-
-/* "View.MemoryView":308
- *
- * @cname('__pyx_memoryview')
- * cdef class memoryview(object): # <<<<<<<<<<<<<<
- *
- * cdef object obj
- */
-struct __pyx_memoryview_obj {
+struct __pyx_obj_7sklearn_4tree_5_tree_Criterion {
PyObject_HEAD
- struct __pyx_vtabstruct_memoryview *__pyx_vtab;
- PyObject *obj;
- PyObject *_size;
- PyObject *_array_interface;
- PyThread_type_lock lock;
- __pyx_atomic_int acquisition_count[2];
- __pyx_atomic_int *acquisition_count_aligned_p;
- Py_buffer view;
- int flags;
- int dtype_is_object;
- __Pyx_TypeInfo *typeinfo;
+ struct __pyx_vtabstruct_7sklearn_4tree_5_tree_Criterion *__pyx_vtab;
+ __pyx_t_7sklearn_4tree_5_tree_DOUBLE_t *y;
+ __pyx_t_7sklearn_4tree_5_tree_SIZE_t y_stride;
+ __pyx_t_7sklearn_4tree_5_tree_DOUBLE_t *sample_weight;
+ __pyx_t_7sklearn_4tree_5_tree_SIZE_t *samples;
+ __pyx_t_7sklearn_4tree_5_tree_SIZE_t start;
+ __pyx_t_7sklearn_4tree_5_tree_SIZE_t pos;
+ __pyx_t_7sklearn_4tree_5_tree_SIZE_t end;
+ __pyx_t_7sklearn_4tree_5_tree_SIZE_t n_outputs;
+ __pyx_t_7sklearn_4tree_5_tree_SIZE_t n_node_samples;
+ double weighted_n_samples;
+ double weighted_n_node_samples;
+ double weighted_n_left;
+ double weighted_n_right;
};
-/* "sklearn/tree/_tree.pxd":60
+/* "sklearn/tree/_tree.pxd":67
* # =============================================================================
*
* cdef class Splitter: # <<<<<<<<<<<<<<
- * # Internal structures
- * cdef public Criterion criterion # Impurity criterion
+ * # The splitter searches in the input space for a feature and a threshold
+ * # to split the samples samples[start:end].
*/
struct __pyx_obj_7sklearn_4tree_5_tree_Splitter {
PyObject_HEAD
@@ -1116,6 +1095,7 @@ struct __pyx_obj_7sklearn_4tree_5_tree_Splitter {
__pyx_t_7sklearn_4tree_5_tree_UINT32_t rand_r_state;
__pyx_t_7sklearn_4tree_5_tree_SIZE_t *samples;
__pyx_t_7sklearn_4tree_5_tree_SIZE_t n_samples;
+ double weighted_n_samples;
__pyx_t_7sklearn_4tree_5_tree_SIZE_t *features;
__pyx_t_7sklearn_4tree_5_tree_SIZE_t *constant_features;
__pyx_t_7sklearn_4tree_5_tree_SIZE_t n_features;
@@ -1131,44 +1111,43 @@ struct __pyx_obj_7sklearn_4tree_5_tree_Splitter {
};
-/* "sklearn/tree/_tree.pxd":24
- * # Criterion
- * # =============================================================================
- * cdef class Criterion: # <<<<<<<<<<<<<<
- * # Internal structures
- * cdef DOUBLE_t* y # Values of y
+/* "sklearn/tree/_tree.pxd":150
+ * DOUBLE_t weighted_n_node_samples # Weighted number of samples at the node
+ *
+ * cdef class Tree: # <<<<<<<<<<<<<<
+ * # The Tree object is a binary tree structure constructed by the
+ * # TreeBuilder. The tree structure is used for predictions and
*/
-struct __pyx_obj_7sklearn_4tree_5_tree_Criterion {
+struct __pyx_obj_7sklearn_4tree_5_tree_Tree {
PyObject_HEAD
- struct __pyx_vtabstruct_7sklearn_4tree_5_tree_Criterion *__pyx_vtab;
- __pyx_t_7sklearn_4tree_5_tree_DOUBLE_t *y;
- __pyx_t_7sklearn_4tree_5_tree_SIZE_t y_stride;
- __pyx_t_7sklearn_4tree_5_tree_DOUBLE_t *sample_weight;
- __pyx_t_7sklearn_4tree_5_tree_SIZE_t *samples;
- __pyx_t_7sklearn_4tree_5_tree_SIZE_t start;
- __pyx_t_7sklearn_4tree_5_tree_SIZE_t pos;
- __pyx_t_7sklearn_4tree_5_tree_SIZE_t end;
+ struct __pyx_vtabstruct_7sklearn_4tree_5_tree_Tree *__pyx_vtab;
+ __pyx_t_7sklearn_4tree_5_tree_SIZE_t n_features;
+ __pyx_t_7sklearn_4tree_5_tree_SIZE_t *n_classes;
__pyx_t_7sklearn_4tree_5_tree_SIZE_t n_outputs;
- __pyx_t_7sklearn_4tree_5_tree_SIZE_t n_node_samples;
- double weighted_n_node_samples;
- double weighted_n_left;
- double weighted_n_right;
+ __pyx_t_7sklearn_4tree_5_tree_SIZE_t max_n_classes;
+ __pyx_t_7sklearn_4tree_5_tree_SIZE_t max_depth;
+ __pyx_t_7sklearn_4tree_5_tree_SIZE_t node_count;
+ __pyx_t_7sklearn_4tree_5_tree_SIZE_t capacity;
+ struct __pyx_t_7sklearn_4tree_5_tree_Node *nodes;
+ double *value;
+ __pyx_t_7sklearn_4tree_5_tree_SIZE_t value_stride;
};
-/* "View.MemoryView":930
- *
- * @cname('__pyx_memoryviewslice')
- * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
- * "Internal class for passing memoryview slices to Python"
+/* "sklearn/tree/_tree.pxd":190
+ * # =============================================================================
*
+ * cdef class TreeBuilder: # <<<<<<<<<<<<<<
+ * # The TreeBuilder recursively builds a Tree object from training samples,
+ * # using a Splitter object for splitting internal nodes and assigning
*/
-struct __pyx_memoryviewslice_obj {
- struct __pyx_memoryview_obj __pyx_base;
- __Pyx_memviewslice from_slice;
- PyObject *from_object;
- PyObject *(*to_object_func)(char *);
- int (*to_dtype_func)(char *, PyObject *);
+struct __pyx_obj_7sklearn_4tree_5_tree_TreeBuilder {
+ PyObject_HEAD
+ struct __pyx_vtabstruct_7sklearn_4tree_5_tree_TreeBuilder *__pyx_vtab;
+ struct __pyx_obj_7sklearn_4tree_5_tree_Splitter *splitter;
+ __pyx_t_7sklearn_4tree_5_tree_SIZE_t min_samples_split;
+ __pyx_t_7sklearn_4tree_5_tree_SIZE_t min_samples_leaf;
+ __pyx_t_7sklearn_4tree_5_tree_SIZE_t max_depth;
};
@@ -1196,50 +1175,103 @@ struct __pyx_array_obj {
};
-/* "sklearn/tree/_tree.pxd":139
+/* "View.MemoryView":275
+ *
+ * @cname('__pyx_MemviewEnum')
+ * cdef class Enum(object): # <<<<<<<<<<<<<<
+ * cdef object name
+ * def __init__(self, name):
+ */
+struct __pyx_MemviewEnum_obj {
+ PyObject_HEAD
+ PyObject *name;
+};
+
+
+/* "View.MemoryView":308
*
+ * @cname('__pyx_memoryview')
+ * cdef class memoryview(object): # <<<<<<<<<<<<<<
*
- * cdef class Tree: # <<<<<<<<<<<<<<
- * # Input/Output layout
- * cdef public SIZE_t n_features # Number of features in X
+ * cdef object obj
*/
-struct __pyx_obj_7sklearn_4tree_5_tree_Tree {
+struct __pyx_memoryview_obj {
PyObject_HEAD
- struct __pyx_vtabstruct_7sklearn_4tree_5_tree_Tree *__pyx_vtab;
- __pyx_t_7sklearn_4tree_5_tree_SIZE_t n_features;
- __pyx_t_7sklearn_4tree_5_tree_SIZE_t *n_classes;
- __pyx_t_7sklearn_4tree_5_tree_SIZE_t n_outputs;
- __pyx_t_7sklearn_4tree_5_tree_SIZE_t max_n_classes;
- __pyx_t_7sklearn_4tree_5_tree_SIZE_t max_depth;
- __pyx_t_7sklearn_4tree_5_tree_SIZE_t node_count;
- __pyx_t_7sklearn_4tree_5_tree_SIZE_t capacity;
- struct __pyx_t_7sklearn_4tree_5_tree_Node *nodes;
- double *value;
- __pyx_t_7sklearn_4tree_5_tree_SIZE_t value_stride;
+ struct __pyx_vtabstruct_memoryview *__pyx_vtab;
+ PyObject *obj;
+ PyObject *_size;
+ PyObject *_array_interface;
+ PyThread_type_lock lock;
+ __pyx_atomic_int acquisition_count[2];
+ __pyx_atomic_int *acquisition_count_aligned_p;
+ Py_buffer view;
+ int flags;
+ int dtype_is_object;
+ __Pyx_TypeInfo *typeinfo;
+};
+
+
+/* "View.MemoryView":930
+ *
+ * @cname('__pyx_memoryviewslice')
+ * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
+ * "Internal class for passing memoryview slices to Python"
+ *
+ */
+struct __pyx_memoryviewslice_obj {
+ struct __pyx_memoryview_obj __pyx_base;
+ __Pyx_memviewslice from_slice;
+ PyObject *from_object;
+ PyObject *(*to_object_func)(char *);
+ int (*to_dtype_func)(char *, PyObject *);
};
-/* "sklearn/tree/_tree.pxd":174
- * # Tree builder
+/* "sklearn/tree/_tree.pxd":25
* # =============================================================================
- * cdef class TreeBuilder: # <<<<<<<<<<<<<<
- * cdef Splitter splitter # Splitting algorithm
*
+ * cdef class Criterion: # <<<<<<<<<<<<<<
+ * # The criterion computes the impurity of a node and the reduction of
+ * # impurity of a split on that node. It also computes the output statistics
*/
-struct __pyx_vtabstruct_7sklearn_4tree_5_tree_TreeBuilder {
- PyObject *(*build)(struct __pyx_obj_7sklearn_4tree_5_tree_TreeBuilder *, struct __pyx_obj_7sklearn_4tree_5_tree_Tree *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7sklearn_4tree_5_tree_11TreeBuilder_build *__pyx_optional_args);
+struct __pyx_vtabstruct_7sklearn_4tree_5_tree_Criterion {
+ void (*init)(struct __pyx_obj_7sklearn_4tree_5_tree_Criterion *, __pyx_t_7sklearn_4tree_5_tree_DOUBLE_t *, __pyx_t_7sklearn_4tree_5_tree_SIZE_t, __pyx_t_7sklearn_4tree_5_tree_DOUBLE_t *, double, __pyx_t_7sklearn_4tree_5_tree_SIZE_t *, __pyx_t_7sklearn_4tree_5_tree_SIZE_t, __pyx_t_7sklearn_4tree_5_tree_SIZE_t);
+ void (*reset)(struct __pyx_obj_7sklearn_4tree_5_tree_Criterion *);
+ void (*update)(struct __pyx_obj_7sklearn_4tree_5_tree_Criterion *, __pyx_t_7sklearn_4tree_5_tree_SIZE_t);
+ double (*node_impurity)(struct __pyx_obj_7sklearn_4tree_5_tree_Criterion *);
+ void (*children_impurity)(struct __pyx_obj_7sklearn_4tree_5_tree_Criterion *, double *, double *);
+ void (*node_value)(struct __pyx_obj_7sklearn_4tree_5_tree_Criterion *, double *);
+ double (*impurity_improvement)(struct __pyx_obj_7sklearn_4tree_5_tree_Criterion *, double);
};
-static struct __pyx_vtabstruct_7sklearn_4tree_5_tree_TreeBuilder *__pyx_vtabptr_7sklearn_4tree_5_tree_TreeBuilder;
+static struct __pyx_vtabstruct_7sklearn_4tree_5_tree_Criterion *__pyx_vtabptr_7sklearn_4tree_5_tree_Criterion;
-/* "sklearn/tree/_tree.pxd":139
+/* "sklearn/tree/_tree.pxd":67
+ * # =============================================================================
*
+ * cdef class Splitter: # <<<<<<<<<<<<<<
+ * # The splitter searches in the input space for a feature and a threshold
+ * # to split the samples samples[start:end].
+ */
+
+struct __pyx_vtabstruct_7sklearn_4tree_5_tree_Splitter {
+ void (*init)(struct __pyx_obj_7sklearn_4tree_5_tree_Splitter *, PyArrayObject *, PyArrayObject *, __pyx_t_7sklearn_4tree_5_tree_DOUBLE_t *);
+ void (*node_reset)(struct __pyx_obj_7sklearn_4tree_5_tree_Splitter *, __pyx_t_7sklearn_4tree_5_tree_SIZE_t, __pyx_t_7sklearn_4tree_5_tree_SIZE_t, double *);
+ void (*node_split)(struct __pyx_obj_7sklearn_4tree_5_tree_Splitter *, double, __pyx_t_7sklearn_4tree_5_tree_SIZE_t *, __pyx_t_7sklearn_4tree_5_tree_SIZE_t *, double *, double *, double *, double *, __pyx_t_7sklearn_4tree_5_tree_SIZE_t *);
+ void (*node_value)(struct __pyx_obj_7sklearn_4tree_5_tree_Splitter *, double *);
+ double (*node_impurity)(struct __pyx_obj_7sklearn_4tree_5_tree_Splitter *);
+};
+static struct __pyx_vtabstruct_7sklearn_4tree_5_tree_Splitter *__pyx_vtabptr_7sklearn_4tree_5_tree_Splitter;
+
+
+/* "sklearn/tree/_tree.pxd":150
+ * DOUBLE_t weighted_n_node_samples # Weighted number of samples at the node
*
* cdef class Tree: # <<<<<<<<<<<<<<
- * # Input/Output layout
- * cdef public SIZE_t n_features # Number of features in X
+ * # The Tree object is a binary tree structure constructed by the
+ * # TreeBuilder. The tree structure is used for predictions and
*/
struct __pyx_vtabstruct_7sklearn_4tree_5_tree_Tree {
@@ -1255,6 +1287,20 @@ struct __pyx_vtabstruct_7sklearn_4tree_5_tree_Tree {
static struct __pyx_vtabstruct_7sklearn_4tree_5_tree_Tree *__pyx_vtabptr_7sklearn_4tree_5_tree_Tree;
+/* "sklearn/tree/_tree.pxd":190
+ * # =============================================================================
+ *
+ * cdef class TreeBuilder: # <<<<<<<<<<<<<<
+ * # The TreeBuilder recursively builds a Tree object from training samples,
+ * # using a Splitter object for splitting internal nodes and assigning
+ */
+
+struct __pyx_vtabstruct_7sklearn_4tree_5_tree_TreeBuilder {
+ PyObject *(*build)(struct __pyx_obj_7sklearn_4tree_5_tree_TreeBuilder *, struct __pyx_obj_7sklearn_4tree_5_tree_Tree *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7sklearn_4tree_5_tree_11TreeBuilder_build *__pyx_optional_args);
+};
+static struct __pyx_vtabstruct_7sklearn_4tree_5_tree_TreeBuilder *__pyx_vtabptr_7sklearn_4tree_5_tree_TreeBuilder;
+
+
/* "View.MemoryView":308
*
* @cname('__pyx_memoryview')
@@ -1287,45 +1333,6 @@ struct __pyx_vtabstruct__memoryviewslice {
struct __pyx_vtabstruct_memoryview __pyx_base;
};
static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
-
-
-
-/* "sklearn/tree/_tree.pxd":24
- * # Criterion
- * # =============================================================================
- * cdef class Criterion: # <<<<<<<<<<<<<<
- * # Internal structures
- * cdef DOUBLE_t* y # Values of y
- */
-
-struct __pyx_vtabstruct_7sklearn_4tree_5_tree_Criterion {
- void (*init)(struct __pyx_obj_7sklearn_4tree_5_tree_Criterion *, __pyx_t_7sklearn_4tree_5_tree_DOUBLE_t *, __pyx_t_7sklearn_4tree_5_tree_SIZE_t, __pyx_t_7sklearn_4tree_5_tree_DOUBLE_t *, __pyx_t_7sklearn_4tree_5_tree_SIZE_t *, __pyx_t_7sklearn_4tree_5_tree_SIZE_t, __pyx_t_7sklearn_4tree_5_tree_SIZE_t);
- void (*reset)(struct __pyx_obj_7sklearn_4tree_5_tree_Criterion *);
- void (*update)(struct __pyx_obj_7sklearn_4tree_5_tree_Criterion *, __pyx_t_7sklearn_4tree_5_tree_SIZE_t);
- double (*node_impurity)(struct __pyx_obj_7sklearn_4tree_5_tree_Criterion *);
- void (*children_impurity)(struct __pyx_obj_7sklearn_4tree_5_tree_Criterion *, double *, double *);
- void (*node_value)(struct __pyx_obj_7sklearn_4tree_5_tree_Criterion *, double *);
- double (*impurity_improvement)(struct __pyx_obj_7sklearn_4tree_5_tree_Criterion *, double);
-};
-static struct __pyx_vtabstruct_7sklearn_4tree_5_tree_Criterion *__pyx_vtabptr_7sklearn_4tree_5_tree_Criterion;
-
-
-/* "sklearn/tree/_tree.pxd":60
- * # =============================================================================
- *
- * cdef class Splitter: # <<<<<<<<<<<<<<
- * # Internal structures
- * cdef public Criterion criterion # Impurity criterion
- */
-
-struct __pyx_vtabstruct_7sklearn_4tree_5_tree_Splitter {
- void (*init)(struct __pyx_obj_7sklearn_4tree_5_tree_Splitter *, PyArrayObject *, PyArrayObject *, __pyx_t_7sklearn_4tree_5_tree_DOUBLE_t *);
- void (*node_reset)(struct __pyx_obj_7sklearn_4tree_5_tree_Splitter *, __pyx_t_7sklearn_4tree_5_tree_SIZE_t, __pyx_t_7sklearn_4tree_5_tree_SIZE_t, double *);
- void (*node_split)(struct __pyx_obj_7sklearn_4tree_5_tree_Splitter *, double, __pyx_t_7sklearn_4tree_5_tree_SIZE_t *, __pyx_t_7sklearn_4tree_5_tree_SIZE_t *, double *, double *, double *, double *, __pyx_t_7sklearn_4tree_5_tree_SIZE_t *);
- void (*node_value)(struct __pyx_obj_7sklearn_4tree_5_tree_Splitter *, double *);
- double (*node_impurity)(struct __pyx_obj_7sklearn_4tree_5_tree_Splitter *);
-};
-static struct __pyx_vtabstruct_7sklearn_4tree_5_tree_Splitter *__pyx_vtabptr_7sklearn_4tree_5_tree_Splitter;
#ifndef CYTHON_REFNANNY
#define CYTHON_REFNANNY 0
#endif
@@ -1434,9 +1441,15 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
int has_cstart, int has_cstop, int wraparound);
-static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/
-
-#define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); /*proto*/
+#else
+#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
+#endif
+
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/
+
+#define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
#define __Pyx_MEMVIEW_DIRECT 1
#define __Pyx_MEMVIEW_PTR 2
#define __Pyx_MEMVIEW_FULL 4
@@ -1838,9 +1851,9 @@ static PyTypeObject *__pyx_ptype_7sklearn_4tree_5_tree_Tree = 0;
static PyTypeObject *__pyx_ptype_7sklearn_4tree_5_tree_TreeBuilder = 0;
/* Module declarations from 'sklearn.ensemble._gradient_boosting' */
-static PyTypeObject *__pyx_memoryview_type = 0;
static PyTypeObject *__pyx_array_type = 0;
static PyTypeObject *__pyx_MemviewEnum_type = 0;
+static PyTypeObject *__pyx_memoryview_type = 0;
static PyTypeObject *__pyx_memoryviewslice_type = 0;
static int __pyx_v_7sklearn_8ensemble_18_gradient_boosting_LEAF;
static PyObject *generic = 0;
@@ -1941,9 +1954,9 @@ static PyObject *__pyx_memoryview_MemoryView_10memoryview_20copy(struct __pyx_me
static PyObject *__pyx_memoryview_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static void __pyx_memoryviewslice_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryviewslice__get__base_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static char __pyx_k_B[] = "B";
static char __pyx_k_H[] = "H";
@@ -2061,7 +2074,7 @@ static char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.ar
static char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous";
static char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
static char __pyx_k_strided_and_direct_or_indirect[] = "";
-static char __pyx_k_Users_ajoly_git_scikit_learn_sk[] = "/Users/ajoly/git/scikit-learn/sklearn/ensemble/_gradient_boosting.pyx";
+static char __pyx_k_home_gilles_Sources_scikit_lear[] = "/home/gilles/Sources/scikit-learn/sklearn/ensemble/_gradient_boosting.pyx";
static char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)";
static char __pyx_k_All_dimensions_preceding_dimensi[] = "All dimensions preceding dimension %d must be indexed and not sliced";
static char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
@@ -2105,7 +2118,6 @@ static PyObject *__pyx_n_s_RuntimeError;
static PyObject *__pyx_kp_s_Total_weight_should_be_1_0_but_w;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
-static PyObject *__pyx_kp_s_Users_ajoly_git_scikit_learn_sk;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_s_X;
static PyObject *__pyx_n_s_allocate_buffer;
@@ -2132,6 +2144,7 @@ static PyObject *__pyx_n_s_format;
static PyObject *__pyx_n_b_fortran;
static PyObject *__pyx_n_s_fortran;
static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;
+static PyObject *__pyx_kp_s_home_gilles_Sources_scikit_lear;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_id;
static PyObject *__pyx_n_s_import;
@@ -2778,7 +2791,7 @@ static PyObject *__pyx_pf_7sklearn_8ensemble_18_gradient_boosting_2predict_stage
__Pyx_GIVEREF(((PyObject *)__pyx_v_out));
__pyx_t_2 = 0;
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
@@ -3072,7 +3085,7 @@ static PyObject *__pyx_f_7sklearn_8ensemble_18_gradient_boosting__partial_depend
__Pyx_GOTREF(__pyx_t_7);
if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_7 = PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
@@ -3132,7 +3145,7 @@ static PyObject *__pyx_f_7sklearn_8ensemble_18_gradient_boosting__partial_depend
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = PyObject_Call(__pyx_t_7, __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
@@ -3339,7 +3352,7 @@ static PyObject *__pyx_f_7sklearn_8ensemble_18_gradient_boosting__partial_depend
* # push left child
* node_stack[stack_size] = root_node + current_node.left_child # <<<<<<<<<<<<<<
* current_weight = weight_stack[stack_size]
- * left_sample_frac = root_node[current_node.left_child].n_samples / \
+ * left_sample_frac = root_node[current_node.left_child].n_node_samples / \
*/
(__pyx_v_node_stack[__pyx_v_stack_size]) = (__pyx_v_root_node + __pyx_v_current_node->left_child);
@@ -3347,8 +3360,8 @@ static PyObject *__pyx_f_7sklearn_8ensemble_18_gradient_boosting__partial_depend
* # push left child
* node_stack[stack_size] = root_node + current_node.left_child
* current_weight = weight_stack[stack_size] # <<<<<<<<<<<<<<
- * left_sample_frac = root_node[current_node.left_child].n_samples / \
- * current_node.n_samples
+ * left_sample_frac = root_node[current_node.left_child].n_node_samples / \
+ * current_node.n_node_samples
*/
__pyx_t_19 = __pyx_v_stack_size;
__pyx_v_current_weight = (*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_weight_stack.data) + __pyx_t_19)) )));
@@ -3356,15 +3369,15 @@ static PyObject *__pyx_f_7sklearn_8ensemble_18_gradient_boosting__partial_depend
/* "sklearn/ensemble/_gradient_boosting.pyx":247
* node_stack[stack_size] = root_node + current_node.left_child
* current_weight = weight_stack[stack_size]
- * left_sample_frac = root_node[current_node.left_child].n_samples / \ # <<<<<<<<<<<<<<
- * current_node.n_samples
+ * left_sample_frac = root_node[current_node.left_child].n_node_samples / \ # <<<<<<<<<<<<<<
+ * current_node.n_node_samples
* if left_sample_frac <= 0.0 or left_sample_frac >= 1.0:
*/
- __pyx_v_left_sample_frac = ((__pyx_v_root_node[__pyx_v_current_node->left_child]).n_samples / ((double)__pyx_v_current_node->n_samples));
+ __pyx_v_left_sample_frac = ((__pyx_v_root_node[__pyx_v_current_node->left_child]).n_node_samples / ((double)__pyx_v_current_node->n_node_samples));
/* "sklearn/ensemble/_gradient_boosting.pyx":249
- * left_sample_frac = root_node[current_node.left_child].n_samples / \
- * current_node.n_samples
+ * left_sample_frac = root_node[current_node.left_child].n_node_samples / \
+ * current_node.n_node_samples
* if left_sample_frac <= 0.0 or left_sample_frac >= 1.0: # <<<<<<<<<<<<<<
* raise ValueError("left_sample_frac:%f, "
* "n_samples current: %d, "
@@ -3382,8 +3395,8 @@ static PyObject *__pyx_f_7sklearn_8ensemble_18_gradient_boosting__partial_depend
* "n_samples current: %d, "
* "n_samples left: %d"
* % (left_sample_frac, # <<<<<<<<<<<<<<
- * current_node.n_samples,
- * root_node[current_node.left_child].n_samples))
+ * current_node.n_node_samples,
+ * root_node[current_node.left_child].n_node_samples))
*/
__pyx_t_9 = PyFloat_FromDouble(__pyx_v_left_sample_frac); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
@@ -3391,29 +3404,29 @@ static PyObject *__pyx_f_7sklearn_8ensemble_18_gradient_boosting__partial_depend
/* "sklearn/ensemble/_gradient_boosting.pyx":254
* "n_samples left: %d"
* % (left_sample_frac,
- * current_node.n_samples, # <<<<<<<<<<<<<<
- * root_node[current_node.left_child].n_samples))
+ * current_node.n_node_samples, # <<<<<<<<<<<<<<
+ * root_node[current_node.left_child].n_node_samples))
* weight_stack[stack_size] = current_weight * left_sample_frac
*/
- __pyx_t_5 = __Pyx_PyInt_From_Py_intptr_t(__pyx_v_current_node->n_samples); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyInt_From_Py_intptr_t(__pyx_v_current_node->n_node_samples); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
/* "sklearn/ensemble/_gradient_boosting.pyx":255
* % (left_sample_frac,
- * current_node.n_samples,
- * root_node[current_node.left_child].n_samples)) # <<<<<<<<<<<<<<
+ * current_node.n_node_samples,
+ * root_node[current_node.left_child].n_node_samples)) # <<<<<<<<<<<<<<
* weight_stack[stack_size] = current_weight * left_sample_frac
* stack_size +=1
*/
- __pyx_t_6 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_root_node[__pyx_v_current_node->left_child]).n_samples); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_root_node[__pyx_v_current_node->left_child]).n_node_samples); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
/* "sklearn/ensemble/_gradient_boosting.pyx":253
* "n_samples current: %d, "
* "n_samples left: %d"
* % (left_sample_frac, # <<<<<<<<<<<<<<
- * current_node.n_samples,
- * root_node[current_node.left_child].n_samples))
+ * current_node.n_node_samples,
+ * root_node[current_node.left_child].n_node_samples))
*/
__pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
@@ -3431,7 +3444,7 @@ static PyObject *__pyx_f_7sklearn_8ensemble_18_gradient_boosting__partial_depend
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
/* "sklearn/ensemble/_gradient_boosting.pyx":250
- * current_node.n_samples
+ * current_node.n_node_samples
* if left_sample_frac <= 0.0 or left_sample_frac >= 1.0:
* raise ValueError("left_sample_frac:%f, " # <<<<<<<<<<<<<<
* "n_samples current: %d, "
@@ -3442,7 +3455,7 @@ static PyObject *__pyx_f_7sklearn_8ensemble_18_gradient_boosting__partial_depend
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
__pyx_t_6 = 0;
- __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_Raise(__pyx_t_6, 0, 0, 0);
@@ -3451,8 +3464,8 @@ static PyObject *__pyx_f_7sklearn_8ensemble_18_gradient_boosting__partial_depend
}
/* "sklearn/ensemble/_gradient_boosting.pyx":256
- * current_node.n_samples,
- * root_node[current_node.left_child].n_samples))
+ * current_node.n_node_samples,
+ * root_node[current_node.left_child].n_node_samples))
* weight_stack[stack_size] = current_weight * left_sample_frac # <<<<<<<<<<<<<<
* stack_size +=1
*
@@ -3461,7 +3474,7 @@ static PyObject *__pyx_f_7sklearn_8ensemble_18_gradient_boosting__partial_depend
*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_weight_stack.data) + __pyx_t_22)) )) = (__pyx_v_current_weight * __pyx_v_left_sample_frac);
/* "sklearn/ensemble/_gradient_boosting.pyx":257
- * root_node[current_node.left_child].n_samples))
+ * root_node[current_node.left_child].n_node_samples))
* weight_stack[stack_size] = current_weight * left_sample_frac
* stack_size +=1 # <<<<<<<<<<<<<<
*
@@ -3541,7 +3554,7 @@ static PyObject *__pyx_f_7sklearn_8ensemble_18_gradient_boosting__partial_depend
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
__Pyx_GIVEREF(__pyx_t_7);
__pyx_t_7 = 0;
- __pyx_t_7 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_Raise(__pyx_t_7, 0, 0, 0);
@@ -3834,7 +3847,7 @@ static PyObject *__pyx_pf_7sklearn_8ensemble_18_gradient_boosting_6_random_sampl
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -3879,7 +3892,7 @@ static PyObject *__pyx_pf_7sklearn_8ensemble_18_gradient_boosting_6_random_sampl
__Pyx_GOTREF(__pyx_t_5);
if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -3975,7 +3988,7 @@ static PyObject *__pyx_pf_7sklearn_8ensemble_18_gradient_boosting_6_random_sampl
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -4016,7 +4029,7 @@ static PyObject *__pyx_pf_7sklearn_8ensemble_18_gradient_boosting_6_random_sampl
return __pyx_r;
}
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":194
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":194
* # experimental exception made for __getbuffer__ and __releasebuffer__
* # -- the details of this may change.
* def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
@@ -4068,7 +4081,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_GIVEREF(__pyx_v_info->obj);
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":200
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":200
* # of flags
*
* if info == NULL: return # <<<<<<<<<<<<<<
@@ -4081,7 +4094,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
goto __pyx_L0;
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":203
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":203
*
* cdef int copy_shape, i, ndim
* cdef int endian_detector = 1 # <<<<<<<<<<<<<<
@@ -4090,7 +4103,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_endian_detector = 1;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":204
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":204
* cdef int copy_shape, i, ndim
* cdef int endian_detector = 1
* cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
@@ -4099,7 +4112,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":206
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":206
* cdef bint little_endian = ((&endian_detector)[0] != 0)
*
* ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<
@@ -4108,7 +4121,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":208
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":208
* ndim = PyArray_NDIM(self)
*
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -4118,7 +4131,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
if (__pyx_t_1) {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":209
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":209
*
* if sizeof(npy_intp) != sizeof(Py_ssize_t):
* copy_shape = 1 # <<<<<<<<<<<<<<
@@ -4130,7 +4143,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
/*else*/ {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":211
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":211
* copy_shape = 1
* else:
* copy_shape = 0 # <<<<<<<<<<<<<<
@@ -4141,7 +4154,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
__pyx_L4:;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":213
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":213
* copy_shape = 0
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -4151,7 +4164,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0);
if (__pyx_t_1) {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":214
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":214
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
@@ -4165,21 +4178,21 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
if (__pyx_t_3) {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":215
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":215
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
* raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
*/
- __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
{__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":217
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":217
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -4189,7 +4202,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_3 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0);
if (__pyx_t_3) {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":218
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":218
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<
@@ -4203,21 +4216,21 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
if (__pyx_t_2) {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":219
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":219
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
* raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
*
* info.buf = PyArray_DATA(self)
*/
- __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
{__pyx_filename = __pyx_f[1]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":221
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":221
* raise ValueError(u"ndarray is not Fortran contiguous")
*
* info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<
@@ -4226,7 +4239,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":222
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":222
*
* info.buf = PyArray_DATA(self)
* info.ndim = ndim # <<<<<<<<<<<<<<
@@ -4235,7 +4248,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->ndim = __pyx_v_ndim;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":223
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":223
* info.buf = PyArray_DATA(self)
* info.ndim = ndim
* if copy_shape: # <<<<<<<<<<<<<<
@@ -4245,7 +4258,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_2 = (__pyx_v_copy_shape != 0);
if (__pyx_t_2) {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":226
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":226
* # Allocate new buffer for strides and shape info.
* # This is allocated as one block, strides first.
* info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<<
@@ -4254,7 +4267,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2)));
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":227
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":227
* # This is allocated as one block, strides first.
* info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2)
* info.shape = info.strides + ndim # <<<<<<<<<<<<<<
@@ -4263,7 +4276,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":228
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":228
* info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2)
* info.shape = info.strides + ndim
* for i in range(ndim): # <<<<<<<<<<<<<<
@@ -4274,7 +4287,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
__pyx_v_i = __pyx_t_6;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":229
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":229
* info.shape = info.strides + ndim
* for i in range(ndim):
* info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<
@@ -4283,7 +4296,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
(__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":230
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":230
* for i in range(ndim):
* info.strides[i] = PyArray_STRIDES(self)[i]
* info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<
@@ -4296,7 +4309,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
/*else*/ {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":232
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":232
* info.shape[i] = PyArray_DIMS(self)[i]
* else:
* info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<<
@@ -4305,7 +4318,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":233
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":233
* else:
* info.strides = PyArray_STRIDES(self)
* info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<<
@@ -4316,7 +4329,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
__pyx_L7:;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":234
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":234
* info.strides = PyArray_STRIDES(self)
* info.shape = PyArray_DIMS(self)
* info.suboffsets = NULL # <<<<<<<<<<<<<<
@@ -4325,7 +4338,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->suboffsets = NULL;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":235
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":235
* info.shape = PyArray_DIMS(self)
* info.suboffsets = NULL
* info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<
@@ -4334,7 +4347,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":236
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":236
* info.suboffsets = NULL
* info.itemsize = PyArray_ITEMSIZE(self)
* info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<
@@ -4343,7 +4356,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":239
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":239
*
* cdef int t
* cdef char* f = NULL # <<<<<<<<<<<<<<
@@ -4352,7 +4365,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_f = NULL;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":240
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":240
* cdef int t
* cdef char* f = NULL
* cdef dtype descr = self.descr # <<<<<<<<<<<<<<
@@ -4364,7 +4377,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_descr = ((PyArray_Descr *)__pyx_t_4);
__pyx_t_4 = 0;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":244
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":244
* cdef int offset
*
* cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<<
@@ -4373,7 +4386,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr);
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":246
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":246
* cdef bint hasfields = PyDataType_HASFIELDS(descr)
*
* if not hasfields and not copy_shape: # <<<<<<<<<<<<<<
@@ -4389,7 +4402,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
if (__pyx_t_1) {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":248
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":248
* if not hasfields and not copy_shape:
* # do not call releasebuffer
* info.obj = None # <<<<<<<<<<<<<<
@@ -4405,7 +4418,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
/*else*/ {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":251
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":251
* else:
* # need to call releasebuffer
* info.obj = self # <<<<<<<<<<<<<<
@@ -4420,7 +4433,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
__pyx_L10:;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":253
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":253
* info.obj = self
*
* if not hasfields: # <<<<<<<<<<<<<<
@@ -4430,7 +4443,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0);
if (__pyx_t_1) {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":254
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":254
*
* if not hasfields:
* t = descr.type_num # <<<<<<<<<<<<<<
@@ -4440,7 +4453,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_5 = __pyx_v_descr->type_num;
__pyx_v_t = __pyx_t_5;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":255
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":255
* if not hasfields:
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -4455,7 +4468,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
if (!__pyx_t_2) {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":256
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":256
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
@@ -4475,21 +4488,21 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
if (__pyx_t_1) {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":257
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B"
*/
- __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
{__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":274
* elif t == NPY_CDOUBLE: f = "Zd"
* elif t == NPY_CLONGDOUBLE: f = "Zg"
* elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<
@@ -4498,7 +4511,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
switch (__pyx_v_t) {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":258
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":258
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported")
* if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<
@@ -4509,7 +4522,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = __pyx_k_b;
break;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":259
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":259
* raise ValueError(u"Non-native byte order not supported")
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<
@@ -4520,7 +4533,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = __pyx_k_B;
break;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":260
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":260
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B"
* elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<
@@ -4531,7 +4544,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = __pyx_k_h;
break;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":261
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":261
* elif t == NPY_UBYTE: f = "B"
* elif t == NPY_SHORT: f = "h"
* elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<<
@@ -4542,7 +4555,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = __pyx_k_H;
break;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":262
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":262
* elif t == NPY_SHORT: f = "h"
* elif t == NPY_USHORT: f = "H"
* elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<<
@@ -4553,7 +4566,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = __pyx_k_i;
break;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":263
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":263
* elif t == NPY_USHORT: f = "H"
* elif t == NPY_INT: f = "i"
* elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<<
@@ -4564,7 +4577,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = __pyx_k_I;
break;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":264
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":264
* elif t == NPY_INT: f = "i"
* elif t == NPY_UINT: f = "I"
* elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<<
@@ -4575,7 +4588,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = __pyx_k_l;
break;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":265
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":265
* elif t == NPY_UINT: f = "I"
* elif t == NPY_LONG: f = "l"
* elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<<
@@ -4586,7 +4599,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = __pyx_k_L;
break;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":266
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":266
* elif t == NPY_LONG: f = "l"
* elif t == NPY_ULONG: f = "L"
* elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<<
@@ -4597,7 +4610,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = __pyx_k_q;
break;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":267
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":267
* elif t == NPY_ULONG: f = "L"
* elif t == NPY_LONGLONG: f = "q"
* elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<<
@@ -4608,7 +4621,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = __pyx_k_Q;
break;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":268
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":268
* elif t == NPY_LONGLONG: f = "q"
* elif t == NPY_ULONGLONG: f = "Q"
* elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<<
@@ -4619,7 +4632,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = __pyx_k_f;
break;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":269
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":269
* elif t == NPY_ULONGLONG: f = "Q"
* elif t == NPY_FLOAT: f = "f"
* elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<<
@@ -4630,7 +4643,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = __pyx_k_d;
break;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":270
* elif t == NPY_FLOAT: f = "f"
* elif t == NPY_DOUBLE: f = "d"
* elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<<
@@ -4641,7 +4654,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = __pyx_k_g;
break;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":271
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":271
* elif t == NPY_DOUBLE: f = "d"
* elif t == NPY_LONGDOUBLE: f = "g"
* elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<<
@@ -4652,7 +4665,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = __pyx_k_Zf;
break;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":272
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":272
* elif t == NPY_LONGDOUBLE: f = "g"
* elif t == NPY_CFLOAT: f = "Zf"
* elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<<
@@ -4663,7 +4676,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = __pyx_k_Zd;
break;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":273
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":273
* elif t == NPY_CFLOAT: f = "Zf"
* elif t == NPY_CDOUBLE: f = "Zd"
* elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<<
@@ -4674,7 +4687,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = __pyx_k_Zg;
break;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":274
* elif t == NPY_CDOUBLE: f = "Zd"
* elif t == NPY_CLONGDOUBLE: f = "Zg"
* elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<
@@ -4686,7 +4699,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
default:
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":276
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":276
* elif t == NPY_OBJECT: f = "O"
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
@@ -4703,7 +4716,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8);
__Pyx_GIVEREF(__pyx_t_8);
__pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_8, 0, 0, 0);
@@ -4712,7 +4725,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
break;
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":277
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":277
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* info.format = f # <<<<<<<<<<<<<<
@@ -4721,7 +4734,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->format = __pyx_v_f;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":278
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":278
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* info.format = f
* return # <<<<<<<<<<<<<<
@@ -4733,7 +4746,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
/*else*/ {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":280
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":280
* return
* else:
* info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<
@@ -4742,7 +4755,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->format = ((char *)malloc(255));
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":281
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":281
* else:
* info.format = stdlib.malloc(_buffer_format_string_len)
* info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<<
@@ -4751,7 +4764,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
(__pyx_v_info->format[0]) = '^';
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":282
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":282
* info.format = stdlib.malloc(_buffer_format_string_len)
* info.format[0] = c'^' # Native data types, manual alignment
* offset = 0 # <<<<<<<<<<<<<<
@@ -4760,7 +4773,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_offset = 0;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":283
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":283
* info.format[0] = c'^' # Native data types, manual alignment
* offset = 0
* f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<<
@@ -4770,7 +4783,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_f = __pyx_t_9;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":286
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":286
* info.format + _buffer_format_string_len,
* &offset)
* f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<<
@@ -4780,7 +4793,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
(__pyx_v_f[0]) = '\x00';
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":194
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":194
* # experimental exception made for __getbuffer__ and __releasebuffer__
* # -- the details of this may change.
* def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
@@ -4812,7 +4825,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
return __pyx_r;
}
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":288
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":288
* f[0] = c'\0' # Terminate format string
*
* def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
@@ -4836,7 +4849,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
int __pyx_t_1;
__Pyx_RefNannySetupContext("__releasebuffer__", 0);
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":289
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":289
*
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
@@ -4846,7 +4859,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
__pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
if (__pyx_t_1) {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":290
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":290
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self):
* stdlib.free(info.format) # <<<<<<<<<<<<<<
@@ -4858,7 +4871,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
}
__pyx_L3:;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":291
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":291
* if PyArray_HASFIELDS(self):
* stdlib.free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -4868,7 +4881,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
__pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
if (__pyx_t_1) {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":292
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":292
* stdlib.free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t):
* stdlib.free(info.strides) # <<<<<<<<<<<<<<
@@ -4880,7 +4893,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
}
__pyx_L4:;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":288
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":288
* f[0] = c'\0' # Terminate format string
*
* def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
@@ -4892,7 +4905,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s
__Pyx_RefNannyFinishContext();
}
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":768
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":768
* ctypedef npy_cdouble complex_t
*
* cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
@@ -4909,7 +4922,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":769
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":769
*
* cdef inline object PyArray_MultiIterNew1(a):
* return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<<
@@ -4923,7 +4936,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":768
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":768
* ctypedef npy_cdouble complex_t
*
* cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
@@ -4942,7 +4955,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__
return __pyx_r;
}
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":771
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":771
* return PyArray_MultiIterNew(1, a)
*
* cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
@@ -4959,7 +4972,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":772
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":772
*
* cdef inline object PyArray_MultiIterNew2(a, b):
* return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<<
@@ -4973,7 +4986,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":771
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":771
* return PyArray_MultiIterNew(1, a)
*
* cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
@@ -4992,7 +5005,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__
return __pyx_r;
}
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":774
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":774
* return PyArray_MultiIterNew(2, a, b)
*
* cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
@@ -5009,7 +5022,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":775
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":775
*
* cdef inline object PyArray_MultiIterNew3(a, b, c):
* return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<<
@@ -5023,7 +5036,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":774
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":774
* return PyArray_MultiIterNew(2, a, b)
*
* cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
@@ -5042,7 +5055,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__
return __pyx_r;
}
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":777
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":777
* return PyArray_MultiIterNew(3, a, b, c)
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
@@ -5059,7 +5072,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":778
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":778
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d):
* return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<<
@@ -5073,7 +5086,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":777
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":777
* return PyArray_MultiIterNew(3, a, b, c)
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
@@ -5092,7 +5105,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__
return __pyx_r;
}
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":780
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":780
* return PyArray_MultiIterNew(4, a, b, c, d)
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
@@ -5109,7 +5122,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":781
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":781
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
* return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<<
@@ -5123,7 +5136,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":780
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":780
* return PyArray_MultiIterNew(4, a, b, c, d)
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
@@ -5142,7 +5155,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__
return __pyx_r;
}
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":783
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":783
* return PyArray_MultiIterNew(5, a, b, c, d, e)
*
* cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
@@ -5176,7 +5189,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_util_dtypestring", 0);
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":790
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":790
* cdef int delta_offset
* cdef tuple i
* cdef int endian_detector = 1 # <<<<<<<<<<<<<<
@@ -5185,7 +5198,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_endian_detector = 1;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":791
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":791
* cdef tuple i
* cdef int endian_detector = 1
* cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
@@ -5194,7 +5207,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":794
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":794
* cdef tuple fields
*
* for childname in descr.names: # <<<<<<<<<<<<<<
@@ -5216,7 +5229,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":795
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":795
*
* for childname in descr.names:
* fields = descr.fields[childname] # <<<<<<<<<<<<<<
@@ -5229,7 +5242,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
__pyx_t_3 = 0;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":796
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":796
* for childname in descr.names:
* fields = descr.fields[childname]
* child, new_offset = fields # <<<<<<<<<<<<<<
@@ -5268,7 +5281,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
__pyx_t_4 = 0;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":798
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":798
* child, new_offset = fields
*
* if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
@@ -5285,21 +5298,21 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
if (__pyx_t_6) {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":799
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":799
*
* if (end - f) - (new_offset - offset[0]) < 15:
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
*
* if ((child.byteorder == c'>' and little_endian) or
*/
- __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
{__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":801
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
*
* if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
@@ -5314,7 +5327,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
if (!__pyx_t_7) {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":802
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":802
*
* if ((child.byteorder == c'>' and little_endian) or
* (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
@@ -5334,21 +5347,21 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
if (__pyx_t_6) {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":803
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":803
* if ((child.byteorder == c'>' and little_endian) or
* (child.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
* # One could encode it in the format string and have Cython
* # complain instead, BUT: < and > in format strings also imply
*/
- __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
{__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":813
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":813
*
* # Output padding bytes
* while offset[0] < new_offset: # <<<<<<<<<<<<<<
@@ -5364,7 +5377,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (!__pyx_t_6) break;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":814
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":814
* # Output padding bytes
* while offset[0] < new_offset:
* f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<<
@@ -5373,7 +5386,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
(__pyx_v_f[0]) = 120;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":815
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":815
* while offset[0] < new_offset:
* f[0] = 120 # "x"; pad byte
* f += 1 # <<<<<<<<<<<<<<
@@ -5382,7 +5395,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
*/
__pyx_v_f = (__pyx_v_f + 1);
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":816
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":816
* f[0] = 120 # "x"; pad byte
* f += 1
* offset[0] += 1 # <<<<<<<<<<<<<<
@@ -5393,7 +5406,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
(__pyx_v_offset[__pyx_t_10]) = ((__pyx_v_offset[__pyx_t_10]) + 1);
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":818
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":818
* offset[0] += 1
*
* offset[0] += child.itemsize # <<<<<<<<<<<<<<
@@ -5403,7 +5416,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_10 = 0;
(__pyx_v_offset[__pyx_t_10]) = ((__pyx_v_offset[__pyx_t_10]) + __pyx_v_child->elsize);
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":820
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":820
* offset[0] += child.itemsize
*
* if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
@@ -5413,7 +5426,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
if (__pyx_t_6) {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":821
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":821
*
* if not PyDataType_HASFIELDS(child):
* t = child.type_num # <<<<<<<<<<<<<<
@@ -5425,7 +5438,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
__pyx_t_4 = 0;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":822
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":822
* if not PyDataType_HASFIELDS(child):
* t = child.type_num
* if end - f < 5: # <<<<<<<<<<<<<<
@@ -5435,21 +5448,21 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
if (__pyx_t_6) {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":823
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":823
* t = child.type_num
* if end - f < 5:
* raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
*
* # Until ticket #99 is fixed, use integers to avoid warnings
*/
- __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
{__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":826
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":826
*
* # Until ticket #99 is fixed, use integers to avoid warnings
* if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<<
@@ -5467,7 +5480,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L11;
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":827
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":827
* # Until ticket #99 is fixed, use integers to avoid warnings
* if t == NPY_BYTE: f[0] = 98 #"b"
* elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<<
@@ -5485,7 +5498,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L11;
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":828
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":828
* if t == NPY_BYTE: f[0] = 98 #"b"
* elif t == NPY_UBYTE: f[0] = 66 #"B"
* elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<<
@@ -5503,7 +5516,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L11;
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":829
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":829
* elif t == NPY_UBYTE: f[0] = 66 #"B"
* elif t == NPY_SHORT: f[0] = 104 #"h"
* elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<<
@@ -5521,7 +5534,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L11;
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":830
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":830
* elif t == NPY_SHORT: f[0] = 104 #"h"
* elif t == NPY_USHORT: f[0] = 72 #"H"
* elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<<
@@ -5539,7 +5552,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L11;
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":831
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":831
* elif t == NPY_USHORT: f[0] = 72 #"H"
* elif t == NPY_INT: f[0] = 105 #"i"
* elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<<
@@ -5557,7 +5570,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L11;
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":832
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":832
* elif t == NPY_INT: f[0] = 105 #"i"
* elif t == NPY_UINT: f[0] = 73 #"I"
* elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<<
@@ -5575,7 +5588,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L11;
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":833
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":833
* elif t == NPY_UINT: f[0] = 73 #"I"
* elif t == NPY_LONG: f[0] = 108 #"l"
* elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<<
@@ -5593,7 +5606,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L11;
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":834
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":834
* elif t == NPY_LONG: f[0] = 108 #"l"
* elif t == NPY_ULONG: f[0] = 76 #"L"
* elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<<
@@ -5611,7 +5624,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L11;
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":835
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":835
* elif t == NPY_ULONG: f[0] = 76 #"L"
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<<
@@ -5629,7 +5642,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L11;
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":836
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":836
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
* elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<<
@@ -5647,7 +5660,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L11;
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":837
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":837
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
* elif t == NPY_FLOAT: f[0] = 102 #"f"
* elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<<
@@ -5665,7 +5678,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L11;
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":838
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":838
* elif t == NPY_FLOAT: f[0] = 102 #"f"
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<<
@@ -5683,7 +5696,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L11;
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":839
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":839
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<<
@@ -5703,7 +5716,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L11;
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":840
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":840
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<<
@@ -5723,7 +5736,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L11;
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":841
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":841
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<<
@@ -5743,7 +5756,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
goto __pyx_L11;
}
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":842
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":842
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
* elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<<
@@ -5762,7 +5775,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
/*else*/ {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":844
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":844
* elif t == NPY_OBJECT: f[0] = 79 #"O"
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
@@ -5776,7 +5789,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
@@ -5785,7 +5798,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__pyx_L11:;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":845
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":845
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* f += 1 # <<<<<<<<<<<<<<
@@ -5797,7 +5810,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
/*else*/ {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":849
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":849
* # Cython ignores struct boundary information ("T{...}"),
* # so don't output it
* f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<<
@@ -5811,7 +5824,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":850
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":850
* # so don't output it
* f = _util_dtypestring(child, f, end, offset)
* return f # <<<<<<<<<<<<<<
@@ -5821,7 +5834,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
__pyx_r = __pyx_v_f;
goto __pyx_L0;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":783
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":783
* return PyArray_MultiIterNew(5, a, b, c, d, e)
*
* cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
@@ -5846,7 +5859,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx
return __pyx_r;
}
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":966
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":966
*
*
* cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
@@ -5861,7 +5874,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
int __pyx_t_2;
__Pyx_RefNannySetupContext("set_array_base", 0);
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":968
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":968
* cdef inline void set_array_base(ndarray arr, object base):
* cdef PyObject* baseptr
* if base is None: # <<<<<<<<<<<<<<
@@ -5872,7 +5885,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":969
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":969
* cdef PyObject* baseptr
* if base is None:
* baseptr = NULL # <<<<<<<<<<<<<<
@@ -5884,7 +5897,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
}
/*else*/ {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":971
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":971
* baseptr = NULL
* else:
* Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<<
@@ -5893,7 +5906,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
*/
Py_INCREF(__pyx_v_base);
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":972
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":972
* else:
* Py_INCREF(base) # important to do this before decref below!
* baseptr = base # <<<<<<<<<<<<<<
@@ -5904,7 +5917,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
}
__pyx_L3:;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":973
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":973
* Py_INCREF(base) # important to do this before decref below!
* baseptr = base
* Py_XDECREF(arr.base) # <<<<<<<<<<<<<<
@@ -5913,7 +5926,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
*/
Py_XDECREF(__pyx_v_arr->base);
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":974
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":974
* baseptr = base
* Py_XDECREF(arr.base)
* arr.base = baseptr # <<<<<<<<<<<<<<
@@ -5922,7 +5935,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
*/
__pyx_v_arr->base = __pyx_v_baseptr;
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":966
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":966
*
*
* cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
@@ -5934,7 +5947,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
__Pyx_RefNannyFinishContext();
}
-/* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":976
+/* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":976
* arr.base = baseptr
*
* cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
@@ -5948,7 +5961,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
int __pyx_t_1;
__Pyx_RefNannySetupContext("get_array_base", 0);
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":977
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":977
*
* cdef inline object get_array_base(ndarray arr):
* if arr.base is NULL: # <<<<<<<<<<<<<<
@@ -5958,7 +5971,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
__pyx_t_1 = ((__pyx_v_arr->base == NULL) != 0);
if (__pyx_t_1) {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":978
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":978
* cdef inline object get_array_base(ndarray arr):
* if arr.base is NULL:
* return None # <<<<<<<<<<<<<<
@@ -5972,7 +5985,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
}
/*else*/ {
- /* "/Users/ajoly/.virtualenvs/research/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":980
+ /* "/usr/local/lib/python2.7/dist-packages/Cython/Includes/numpy/__init__.pxd":980
* return None
* else:
* return