Commit Graph

3404 Commits

Author SHA1 Message Date
Wenzel Jakob
e357ed3cc8 Merge pull request #339 from dean0x7d/docfix
Fix sphinx doc missing code blocks and warnings
2016-08-16 02:02:17 +02:00
Dean Moldovan
aebca12bb9 Fix sphinx doc missing code blocks and warnings
The missing empty line after `.. code-block::` resulted in incorrectly
parsed restructuredtext (sphinx warnings) and the code blocks were not
generated in the html output.

The `exclude_patterns` change just silences the orphaned file warning.

[ci skip]
2016-08-16 01:30:58 +02:00
Wenzel Jakob
94f2052d08 Merge pull request #335 from aldanor/bugfix/is_pod_struct
Decay types before passing to is_pod_struct<> / npy_format_descriptor<>
2016-08-15 20:12:06 +02:00
Ivan Smirnov
6956b655f0 Simplify code in eigen.h using new array ctors 2016-08-15 18:41:54 +01:00
Ivan Smirnov
67b3daeea4 Always decay type param of npy_format_descriptor 2016-08-15 18:41:54 +01:00
Ivan Smirnov
edbd4cb0a7 Decay const qualifiers in is_pod_struct<> 2016-08-15 18:41:54 +01:00
Wenzel Jakob
6ecb5b1583 Merge pull request #337 from dean0x7d/werror
Report warnings as errors on Travis and AppVeyor (-Werror)
2016-08-15 14:19:01 +02:00
Dean Moldovan
9d52796a08 Fix "_POSIX_C_SOURCE" redefined warning on Python 2.7 2016-08-15 13:49:34 +02:00
Dean Moldovan
00a300950b Report warnings as errors on Travis and AppVeyor 2016-08-15 13:41:44 +02:00
Wenzel Jakob
91bdcf3acd Merge pull request #336 from jagerman/gcc6-testing
Add g++-6 builds to travis-ci
2016-08-15 06:47:38 +02:00
Wenzel Jakob
6a0a850742 Merge pull request #334 from aldanor/bugfix/string-descriptors
Fix format descriptors for string types
2016-08-15 06:47:13 +02:00
Jason Rhinelander
024ce4471b Add g++-6 builds to travis-ci
The current linux/g++ testing (using a backported g++-4.8 on a
4-year-old Ubuntu) is quite ancient.  It's good as a baseline level of
support, but it means we aren't testing g++'s C++14 support at all
(which is why #334 happened).

This commit adds a docker-based travis-ci build using the debian
"testing" distribution, which will give us both another test system
(with different versions of build tools), while, more importantly, also
adding a build and test run using g++ in C++14 mode.
2016-08-14 22:32:30 -04:00
Ivan Smirnov
03fb488579 format_descriptor::format() now yields std::string
This is required since format descriptors for string types that
were using PYBIND11_DESCR were causing problems on C++14 on Linux.

Although this is technically a breaking change, it shouldn't cause
problems since the only use of format strings is passing them to
buffer_info constructor which expects std::string.

Note: for non-structured types, the const char * value is still
accessible via ::value for compatibility purpose.
2016-08-15 00:40:29 +01:00
Wenzel Jakob
6fc7a30211 Merge pull request #333 from aldanor/feature/print
Add handle::repr() method
2016-08-14 14:46:13 +02:00
Ivan Smirnov
6715736936 Add handle::repr() method 2016-08-14 13:43:31 +01:00
Wenzel Jakob
3c3533b4bc Merge pull request #308 from aldanor/recarray
py::dtype, buffer protocol improvements, structured types support
2016-08-13 22:21:46 +02:00
Ivan Smirnov
bccbc10a65 Update changelog and authors 2016-08-13 21:17:26 +01:00
Ivan Smirnov
7dcbfe228e Add a missing bytes ctor from const char * 2016-08-13 20:00:15 +01:00
Ivan Smirnov
c22fe428ed Change str/bytes cast operators to ctors 2016-08-13 19:39:11 +01:00
Ivan Smirnov
89ec7f3e79 Add (const char *, size_t) ctors for str/bytes 2016-08-13 19:38:50 +01:00
Ivan Smirnov
1e1217817b Use explicit casts in str/bytes tests 2016-08-13 18:52:39 +01:00
Ivan Smirnov
fd6cede7e9 Avoid extra allocations in operator str/bytes 2016-08-13 15:46:46 +01:00
Ivan Smirnov
35c51c477b A more strict bytes/str test 2016-08-13 13:52:27 +01:00
Ivan Smirnov
b65185906d Update the docs to use the new array ctor 2016-08-13 13:28:56 +01:00
Ivan Smirnov
245f77b4d5 Use uint64_t instead of long in numpy tests (MSVC) 2016-08-13 13:20:36 +01:00
Ivan Smirnov
f36ec97827 Fix MSVC warnings in numpy example 2016-08-13 13:14:51 +01:00
Ivan Smirnov
0d7a015fb4 Update numpy docstring test to the new format 2016-08-13 12:56:51 +01:00
Ivan Smirnov
4611bcdd36 Fix rebasing problems in example-python-types 2016-08-13 12:55:35 +01:00
Ivan Smirnov
61e3b0bd15 Use builtin str type for recarray field names 2016-08-13 12:51:31 +01:00
Ivan Smirnov
1cdd171fbc Add PYBIND11_STR_TYPE to represent builtin str 2016-08-13 12:51:31 +01:00
Ivan Smirnov
88239ef83d Don't use unittest in tests (Python 2 compat) 2016-08-13 12:51:31 +01:00
Ivan Smirnov
006d8b6621 Add casting operators between py::str / py::bytes 2016-08-13 12:51:31 +01:00
Ivan Smirnov
3768b6abf9 Use fully qualified name in PYBIND11_DESCR macro 2016-08-13 12:43:16 +01:00
Ivan Smirnov
ad5ca6d4e6 Added dtype from const char pointer ctor 2016-08-13 12:43:16 +01:00
Ivan Smirnov
c6257f8641 Allow nullptr in array ctors wherever possible 2016-08-13 12:43:16 +01:00
Ivan Smirnov
10af58fa77 Add a few more dtype tests 2016-08-13 12:43:16 +01:00
Ivan Smirnov
611e614619 Add tests for py::dtype ctors 2016-08-13 12:43:16 +01:00
Ivan Smirnov
e19980cc10 Add tests for new array/array_t ctors 2016-08-13 12:43:16 +01:00
Ivan Smirnov
98ba98c06b Add a simplified buffer_info ctor for 1-D case 2016-08-13 12:43:16 +01:00
Ivan Smirnov
6636ae9d4e Also add the new ctors to py::array_t 2016-08-13 12:43:16 +01:00
Ivan Smirnov
6bb0ee1186 Add all possible ctors for py::array 2016-08-13 12:43:16 +01:00
Ivan Smirnov
d77bc8c343 Add dtype(names, offsets, formats, itemsize) ctor 2016-08-13 12:43:16 +01:00
Ivan Smirnov
fc5620afa6 Fix a segfault where func object wasn't released 2016-08-13 12:43:16 +01:00
Ivan Smirnov
01f7409550 Initial implementation of py::dtype 2016-08-13 12:43:16 +01:00
Ivan Smirnov
05cb58ade2 Cleanup: move numpy API bindings out of py::array 2016-08-13 12:43:16 +01:00
Ivan Smirnov
afb07e7e92 Code reordering / cleanup only 2016-08-13 12:43:16 +01:00
Ivan Smirnov
5db82353f7 Rename example20 -> example-numpy-dtypes 2016-08-13 12:43:16 +01:00
Ivan Smirnov
f9c0defed7 Add numpy wrappers for char[] and std::array<char> 2016-08-13 12:43:16 +01:00
Ivan Smirnov
103d5eadc3 Remove redundant definition 2016-08-13 12:43:16 +01:00
Ivan Smirnov
098f9aef73 Replace 4096B format buffer with std::string 2016-08-13 12:43:16 +01:00