FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
xtensor-python/include/xtensor-python/pynative_casters.hpp at master · gouarin/xtensor-python · GitHub
gouarin
xtensor-python
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
xtensor-python
/
include
/
xtensor-python
/
pynative_casters.hpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
51 lines (43 loc) · 2.03 KB
Breadcrumbs
xtensor-python
/
include
/
xtensor-python
/
pynative_casters.hpp
Copy path
File metadata and controls
51 lines (43 loc) · 2.03 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
**************************************************************************
* Copyright (c) Wolf Vollprecht, Johan Mabille and Sylvain Corlay *
* Copyright (c) QuantStack *
* *
* Distributed under the terms of the BSD 3-Clause License. *
* *
* The full license is in the file LICENSE, distributed with this software. *
***************************************************************************
*/
#
ifndef
PYNATIVE_CASTERS_HPP
#
define
PYNATIVE_CASTERS_HPP
#
include
"
xtensor_type_caster_base.hpp
"
namespace
pybind11
{
namespace
detail
{
//
Type caster for casting xarray to ndarray
template
<
class
T
, xt::layout_type L>
struct
type_caster
<xt::xarray<T, L>> : xtensor_type_caster_base<xt::xarray<T, L>>
{
};
//
Type caster for casting xt::xtensor to ndarray
template
<
class
T
, std::
size_t
N, xt::layout_type L>
struct
type_caster
<xt::xtensor<T, N, L>> : xtensor_type_caster_base<xt::xtensor<T, N, L>>
{
};
//
Type caster for casting xt::xstrided_view to ndarray
template
<
class
CT
,
class
S
, xt::layout_type L,
class
FST
>
struct
type_caster
<xt::xstrided_view<
CT
, S, L,
FST
>> : xtensor_type_caster_base<xt::xstrided_view<
CT
, S, L,
FST
>>
{
};
//
Type caster for casting xt::xarray_adaptor to ndarray
template
<
class
EC
, xt::layout_type L,
class
SC
,
class
Tag
>
struct
type_caster
<xt::xarray_adaptor<
EC
, L,
SC
, Tag>> : xtensor_type_caster_base<xt::xarray_adaptor<
EC
, L,
SC
, Tag>>
{
};
//
Type caster for casting xt::xtensor_adaptor to ndarray
template
<
class
EC
, std::
size_t
N, xt::layout_type L,
class
Tag
>
struct
type_caster
<xt::xtensor_adaptor<
EC
, N, L, Tag>> : xtensor_type_caster_base<xt::xtensor_adaptor<
EC
, N, L, Tag>>
{
};
}
}
#
endif
Back
|
FazBrowse Home
|
New Git URL