Skip to content

Commit c935f0e

Browse files
committed
Fix issue with some array setters.
1 parent 6703eca commit c935f0e

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Python bindings and misc tools for using OpenDSS (EPRI Distribution System Simul
66

77
If you are looking for the C API library, see [`dss_capi`](http://github.com/PMeira/dss_capi/).
88

9-
Version 0.9.6, based on [OpenDSS revision 2152](https://sourceforge.net/p/electricdss/code/2152/tree/).
9+
Version 0.9.7, based on [OpenDSS revision 2152](https://sourceforge.net/p/electricdss/code/2152/tree/).
1010
This is a work-in-progress but it's deemed stable enough to be made public.
1111
*Note that, while the interface with OpenDSS is stable (classic version), the OpenDSS-PM (actor-based parallel machine version) interface was integrated recently and is experimental.*
1212

@@ -17,6 +17,7 @@ This module depends on CFFI, NumPy and, optionally, SciPy.Sparse for reading the
1717

1818
Recent changes
1919
==============
20+
- 2018-04-30 / version 0.9.7: Fix some of the setters that used array data.
2021
- 2018-04-05 / version 0.9.6: Adds missing `ActiveCircuit.CktElements[index]` (or `...CktElements(index)`) and `ActiveCircuit.Buses[index]` (or `...Buses(index)`).
2122
- 2018-03-07 / version 0.9.4: Allows using `len` on several classes, fixes DSSProperty, and includes COM helpstrings as docstrings. Contains changes up to OpenDSS revision 2152.
2223
- 2018-02-16 / version 0.9.3: Integrates COM interface fixes from revision 2136 (`First` `Next` iteration on some elements)

README.pdf

61 Bytes
Binary file not shown.

dss/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
from .enums import *
88
from . import enums
99

10-
__version__ = '0.9.6'
10+
__version__ = '0.9.7'

dss/_cffi_api_util.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,16 @@ def prepare_float64_array(self, value):
117117
if type(value) is not np.ndarray or value.dtype != np.float64:
118118
value = np.array(value, dtype=np.float64)
119119

120-
ptr = self.ffi.cast('double*', self.ffi.from_buffer(data.data))
121-
cnt = data.size
120+
ptr = self.ffi.cast('double*', self.ffi.from_buffer(value.data))
121+
cnt = value.size
122122
return value, ptr, cnt
123123

124124
def prepare_int32_array(self, value):
125125
if type(value) is not np.ndarray or value.dtype != np.int32:
126126
value = np.array(value, dtype=np.int32)
127127

128-
ptr = self.ffi.cast('int32_t*', self.ffi.from_buffer(data.data))
129-
cnt = data.size
128+
ptr = self.ffi.cast('int32_t*', self.ffi.from_buffer(value.data))
129+
cnt = value.size
130130
return value, ptr, cnt
131131

132132
def prepare_string_array(self, value):

dss/pm/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
from ..enums import *
88
from .. import enums
99

10-
__version__ = '0.9.6'
10+
__version__ = '0.9.7'

0 commit comments

Comments
 (0)