Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
graph-tool
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
43
Issues
43
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tiago Peixoto
graph-tool
Commits
2bc9ddf4
Commit
2bc9ddf4
authored
Sep 05, 2015
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue in Graph.add_edge_list()
parent
6957f8ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
src/graph_tool/__init__.py
src/graph_tool/__init__.py
+12
-9
No files found.
src/graph_tool/__init__.py
View file @
2bc9ddf4
...
...
@@ -217,22 +217,25 @@ def _python_type(type_name):
return
object
def
_gt_type
(
obj
):
t
=
type
(
obj
)
if
t
in
(
numpy
.
int16
,
numpy
.
uint16
,
numpy
.
int8
,
numpy
.
uint8
):
if
isinstance
(
obj
,
numpy
.
dtype
):
t
=
obj
.
type
else
:
t
=
type
(
obj
)
if
issubclass
(
t
,
(
numpy
.
int16
,
numpy
.
uint16
,
numpy
.
int8
,
numpy
.
uint8
)):
return
"int16_t"
if
t
in
(
int
,
numpy
.
int32
,
numpy
.
uint32
):
if
issubclass
(
t
,
(
int
,
numpy
.
int32
,
numpy
.
uint32
)
):
return
"int32_t"
if
t
in
(
numpy
.
longlong
,
numpy
.
uint64
,
numpy
.
int64
):
if
issubclass
(
t
,
(
numpy
.
longlong
,
numpy
.
uint64
,
numpy
.
int64
)
):
return
"int64_t"
if
t
in
(
float
,
numpy
.
float
,
numpy
.
float16
,
numpy
.
float32
,
numpy
.
float64
):
if
issubclass
(
t
,
(
float
,
numpy
.
float
,
numpy
.
float16
,
numpy
.
float32
,
numpy
.
float64
)
):
return
"double"
if
t
is
numpy
.
float128
:
if
issubclass
(
t
,
numpy
.
float128
)
:
return
"long double"
if
t
is
str
:
if
issubclass
(
t
,
str
)
:
return
"string"
if
t
is
bool
:
if
issubclass
(
t
,
bool
)
:
return
"bool"
if
issubclass
(
t
,
list
)
or
issubclass
(
t
,
numpy
.
ndarray
):
if
issubclass
(
t
,
(
list
,
numpy
.
ndarray
)
):
return
"vector<%s>"
%
_gt_type
(
obj
[
0
])
return
"object"
...
...
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