Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
b22b91af
Commit
b22b91af
authored
Sep 25, 2009
by
Dag Sverre Seljebotn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better check for broken NumPy install
parent
12f3971c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
tests/run/numpy_test.pyx
tests/run/numpy_test.pyx
+16
-0
No files found.
tests/run/numpy_test.pyx
View file @
b22b91af
...
...
@@ -17,6 +17,8 @@ try:
import
numpy
as
np
__doc__
=
u"""
>>> assert_dtype_sizes()
>>> basic()
[[0 1 2 3 4]
[5 6 7 8 9]]
...
...
@@ -209,6 +211,20 @@ except:
__doc__
=
u""
def
assert_dtype_sizes
():
assert
sizeof
(
np
.
int8_t
)
==
1
assert
sizeof
(
np
.
int16_t
)
==
2
assert
sizeof
(
np
.
int32_t
)
==
4
assert
sizeof
(
np
.
int64_t
)
==
8
assert
sizeof
(
np
.
uint8_t
)
==
1
assert
sizeof
(
np
.
uint16_t
)
==
2
assert
sizeof
(
np
.
uint32_t
)
==
4
assert
sizeof
(
np
.
uint64_t
)
==
8
assert
sizeof
(
np
.
float32_t
)
==
4
assert
sizeof
(
np
.
float64_t
)
==
8
assert
sizeof
(
np
.
complex64_t
)
==
8
assert
sizeof
(
np
.
complex128_t
)
==
16
def
ndarray_str
(
arr
):
u"""
Since Py2.3 doctest don't support <BLANKLINE>, manually replace blank lines
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment