Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xdmf
Xdmf
Commits
4f077f1f
Commit
4f077f1f
authored
Sep 08, 2010
by
Kenneth D. Renard (Cont ARL/CISD) kdrenard
Committed by
Kenneth Leiter
Sep 23, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIX: Handle error conditions better in XdmfArray.getNumpyArray()
parent
15b37b03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
core/XdmfCore.i
core/XdmfCore.i
+18
-18
No files found.
core/XdmfCore.i
View file @
4f077f1f
...
...
@@ -140,24 +140,24 @@ swig -v -c++ -python -o XdmfCorePython.cpp XdmfCore.i
buf
=
self
.
getBuffer
()
aType
=
self
.
getArrayType
()
if
aType
==
XdmfArrayType
.
Int8
()
:
na
=
___frombuffer
(
buf
,
'
int8
'
)
el
if
aType
==
XdmfArrayType
.
Int16
()
:
na
=
___frombuffer
(
buf
,
'
int16
'
)
el
if
aType
==
XdmfArrayType
.
Int32
()
:
na
=
___frombuffer
(
buf
,
'
int32
'
)
el
if
aType
==
XdmfArrayType
.
Int64
()
:
na
=
___frombuffer
(
buf
,
'
int64
'
)
el
if
aType
==
XdmfArrayType
.
Float32
()
:
na
=
___frombuffer
(
buf
,
'
float32
'
)
el
if
aType
==
XdmfArrayType
.
Float64
()
:
na
=
___frombuffer
(
buf
,
'
float64
'
)
el
if
aType
==
XdmfArrayType
.
UInt8
()
:
na
=
___frombuffer
(
buf
,
'
uint8
'
)
el
if
aType
==
XdmfArrayType
.
UInt16
()
:
na
=
___frombuffer
(
buf
,
'
uint16
'
)
el
if
aType
==
XdmfArrayType
.
UInt32
()
:
na
=
___frombuffer
(
buf
,
'
uint32
'
)
return
na
;
return
(
___frombuffer
(
buf
,
'
int8
'
)
)
if
aType
==
XdmfArrayType
.
Int16
()
:
return
(
___frombuffer
(
buf
,
'
int16
'
)
)
if
aType
==
XdmfArrayType
.
Int32
()
:
return
(
___frombuffer
(
buf
,
'
int32
'
)
)
if
aType
==
XdmfArrayType
.
Int64
()
:
return
(
___frombuffer
(
buf
,
'
int64
'
)
)
if
aType
==
XdmfArrayType
.
Float32
()
:
return
(
___frombuffer
(
buf
,
'
float32
'
)
)
if
aType
==
XdmfArrayType
.
Float64
()
:
return
(
___frombuffer
(
buf
,
'
float64
'
)
)
if
aType
==
XdmfArrayType
.
UInt8
()
:
return
(
___frombuffer
(
buf
,
'
uint8
'
)
)
if
aType
==
XdmfArrayType
.
UInt16
()
:
return
(
___frombuffer
(
buf
,
'
uint16
'
)
)
if
aType
==
XdmfArrayType
.
UInt32
()
:
return
(
___frombuffer
(
buf
,
'
uint32
'
)
)
return
None
;
}
;
...
...
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