Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

Commit

Permalink
Make rational into a subpackage of npytypes
Browse files Browse the repository at this point in the history
  • Loading branch information
taldcroft committed Jul 4, 2012
1 parent 72409d2 commit 193abeb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions npytypes/quaternion/__init__.py
@@ -1,12 +1,12 @@
from info import __doc__
import numpy as np

__all__ = ['quaternion']
from .numpy_quaternion import quaternion
from .info import __doc__

import numpy
from numpy_quaternion import quaternion
__all__ = ['quaternion']

if numpy.__dict__.get('quaternion') is not None:
if np.__dict__.get('quaternion') is not None:
raise RuntimeError('The NumPy package already has a quaternion type')

numpy.quaternion = quaternion
numpy.typeDict['quaternion'] = numpy.dtype(quaternion)
np.quaternion = quaternion
np.typeDict['quaternion'] = np.dtype(quaternion)
2 changes: 1 addition & 1 deletion npytypes/rational/rational.c
Expand Up @@ -974,7 +974,7 @@ rational_matrix_multiply(char **args, npy_intp *dimensions, npy_intp *steps)
npy_intp os_p = steps[5];

/* core dimensions counters */
npy_intp m, n, p;
npy_intp m, p;

/* calculate dot product for each row/column vector pair */
for (m = 0; m < dm; m++) {
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Expand Up @@ -3,7 +3,7 @@

ext_modules = []

ext = Extension('npytypes.rational',
ext = Extension('npytypes.rational.rational',
sources=['npytypes/rational/rational.c'],
include_dirs=[np.get_include()])
ext_modules.append(ext)
Expand All @@ -20,6 +20,6 @@
description='NumPy type extensions',
packages=['npytypes',
'npytypes.quaternion',
# 'npytypes.rational'
'npytypes.rational'
],
ext_modules=ext_modules)

0 comments on commit 193abeb

Please sign in to comment.