Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cigale
CIGALE
Commits
efe27091
Commit
efe27091
authored
Mar 30, 2018
by
Médéric Boquien
Browse files
Now that we use dictionaries we do not need to reshape RawArrays anymore as we only use 1D arrays.
parent
29934196
Changes
1
Hide whitespace changes
Inline
Side-by-side
pcigale/managers/utils.py
View file @
efe27091
...
@@ -33,13 +33,12 @@ class SharedArray(object):
...
@@ -33,13 +33,12 @@ class SharedArray(object):
not write on the same section.
not write on the same section.
"""
"""
def
__init__
(
self
,
shape
):
def
__init__
(
self
,
size
):
self
.
_shape
=
shape
self
.
array
=
RawArray
(
ctypes
.
c_double
,
size
)
self
.
array
=
RawArray
(
ctypes
.
c_double
,
int
(
np
.
product
(
self
.
_shape
)))
@
property
@
property
def
array
(
self
):
def
array
(
self
):
return
np
.
ctypeslib
.
as_array
(
self
.
_array
)
.
reshape
(
self
.
_shape
)
return
np
.
ctypeslib
.
as_array
(
self
.
_array
)
@
array
.
setter
@
array
.
setter
def
array
(
self
,
array
):
def
array
(
self
,
array
):
...
@@ -47,7 +46,3 @@ class SharedArray(object):
...
@@ -47,7 +46,3 @@ class SharedArray(object):
self
.
_array
=
array
self
.
_array
=
array
else
:
else
:
raise
TypeError
(
"Type must be RawArray."
)
raise
TypeError
(
"Type must be RawArray."
)
@
property
def
shape
(
self
):
return
self
.
_shape
Write
Preview
Supports
Markdown
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