Skip to content

Commit c43d413

Browse files
authored
Merge pull request #11 from IntuitionEngineeringTeam/beta
Bug_fix
2 parents c71df7d + 0632d8d commit c43d413

6 files changed

Lines changed: 23 additions & 19 deletions

File tree

rbp_setup_tools/code_generation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
22
# Created by Soldoskikh Kirill.
3-
# Copyright © 2018 Intuition. All rights reserved.
3+
# Copyright 2018 Intuition. All rights reserved.
44
#
55

66
# Generates templated source code for multiple types.

rbp_setup_tools/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
22
# Created by Soldoskikh Kirill.
3-
# Copyright © 2018 Intuition. All rights reserved.
3+
# Copyright 2018 Intuition. All rights reserved.
44
#
55

66
TYPES = [ 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t','uint96_t', 'uint128_t',

redblackpy/cython_source/__dtype_tree_processing.pxi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ cdef void __erase_node_{DTYPE}(rb_tree_ptr& index, key) except*:
4040
index.erase(node)
4141

4242

43-
cdef inline void __set_value_{DTYPE}(node_ptr node, {DTYPE} value) nogil:
43+
cdef inline void __set_value_{DTYPE}(node_ptr node, {DTYPE} value) nogil except*:
4444

4545
if deref(node).value != NULL:
4646
(<{DTYPE}*>deref(node).value)[0] = value
@@ -50,7 +50,7 @@ cdef inline void __set_value_{DTYPE}(node_ptr node, {DTYPE} value) nogil:
5050
(<{DTYPE}*>deref(node).value)[0] = value
5151

5252

53-
cdef inline void __dealloc_value_{DTYPE}(node_ptr node) nogil:
53+
cdef inline void __dealloc_value_{DTYPE}(node_ptr node) nogil except*:
5454

5555
if deref(node).value != NULL:
5656
free(deref(node).value)

redblackpy/cython_source/object_tree_processing.pxi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ cdef inline object __deref_value_ptr_object(node_ptr node):
77
return <object>deref(node).value
88

99

10-
cdef inline void __insert_node_object(rb_tree_ptr& index, key, value):
10+
cdef inline void __insert_node_object(rb_tree_ptr& index, key, value) except*:
1111

1212
index.insert( rb_node_valued( to_c_pyobject(key),
1313
to_c_pyobject(value).data ) )
1414

1515

1616
cdef inline void __insert_node_by_ptr_object( rb_tree_ptr& index, node_ptr& position,
17-
key, value ):
17+
key, value ) except*:
1818

1919
index.insert( position, rb_node_valued( to_c_pyobject(key),
2020
to_c_pyobject(value).data ) )
2121

2222

23-
cdef void __erase_node_object(rb_tree_ptr& index, key):
23+
cdef void __erase_node_object(rb_tree_ptr& index, key) except*:
2424

2525
cdef c_pyobject c_key = c_pyobject(<PyObject*>key)
2626
cdef node_ptr node = index.search(c_key)
@@ -33,12 +33,12 @@ cdef void __erase_node_object(rb_tree_ptr& index, key):
3333
index.erase(node)
3434

3535

36-
cdef void __set_value_object(node_ptr node, value):
36+
cdef void __set_value_object(node_ptr node, value) except*:
3737

3838
Py_XDECREF(<PyObject*>deref(node).value)
3939
deref(node).value = to_c_pyobject(value).data
4040

4141

42-
cdef inline void __dealloc_value_object(node_ptr node):
42+
cdef inline void __dealloc_value_object(node_ptr node) except*:
4343

4444
Py_XDECREF(<PyObject*>deref(node).value)

redblackpy/series/tree_series.pyx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,9 @@ cdef class Series:
808808
"""
809809
Initialize Series object from pandas.Series.
810810
"""
811-
cdef Series result = Series( dtype=str(pd_series.dtype),
811+
cdef Series result = Series( index=pd_series.index,
812+
values=pd_series.data,
813+
dtype=str(pd_series.dtype),
812814
interpolate=interpolate,
813815
extrapolate=extrapolate,
814816
arithmetic=arithmetic )

setup.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
22
# Created by Soldoskikh Kirill.
3-
# Copyright © 2018 Intuition. All rights reserved.
3+
# Copyright 2018 Intuition. All rights reserved.
44
#
55

66
import os
@@ -16,7 +16,7 @@
1616
if platform.system() == 'Darwin':
1717

1818
compile_opts = [ '-std=c++11',
19-
'-mmacosx-version-min=10.9',
19+
'-mmacosx-version-min=10.7',
2020
'-stdlib=libc++',
2121
'-Ofast' ]
2222

@@ -98,9 +98,9 @@
9898

9999
setup( name='redblackpy',
100100
ext_modules = cythonize(ext_modules),
101-
version='0.1.0.0',
101+
version='0.1.1.0',
102102
author='Solodskikh Kirill',
103-
author_email='solodskihkirill@gmail.com',
103+
author_email='hypo@intuition.engineering',
104104
maintainer='Intuition',
105105
maintainer_email='dev@intuition.engineering',
106106
install_requires=['cython>=0.27', 'pandas'],
@@ -114,8 +114,10 @@
114114
license='Apache License 2.0',
115115
long_description='RedBlackPy is a light Python library that provides data structures \
116116
aimed to fast insertion, removal and self sorting to manipulating ordered data in efficient way.\
117-
The core part of the library had been written on C++ and then was wrapped in Cython. \
118-
Hope that many would find the primary data structures of this library very handy in working \
119-
with time series. One of the main feature of this structures is an access by arbitrary \
120-
key using interpolation, what makes processing of multiple non synchronized time series very simple.\
121-
All data structures based on red black trees.' )
117+
The core part of the library had been written on C++ and then was wrapped in Cython. \
118+
Hope that many would find the primary data structures of this library very handy in working \
119+
with time series. One of the main feature of this structures is an access by arbitrary \
120+
key using interpolation, what makes processing of multiple non synchronized time series very simple.\
121+
All data structures based on red black trees.',
122+
classifiers = [ 'Programming Language :: Python :: 2.7',
123+
'Programming Language :: Python :: 3' ] )

0 commit comments

Comments
 (0)