Skip to content

Commit

Permalink
Fix how values are accessed in when preparing cartograms due to chang…
Browse files Browse the repository at this point in the history
…e in api
  • Loading branch information
mz committed Jun 8, 2017
1 parent 07e661e commit bc70613
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 82 deletions.
2 changes: 1 addition & 1 deletion magrit_app/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-

__version__ = '0.3.0'
__version__ = '0.3.1'
153 changes: 76 additions & 77 deletions magrit_app/helpers/cartogram_doug.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion magrit_app/helpers/cartogram_doug.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Generated by Cython 0.25.1 */
/* Generated by Cython 0.25.2 */

#ifndef __PYX_HAVE__magrit_app__helpers__cartogram_doug
#define __PYX_HAVE__magrit_app__helpers__cartogram_doug
Expand Down
2 changes: 1 addition & 1 deletion magrit_app/helpers/cartogram_doug.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ cdef class Cartogram(object):
self.iterations = iterations
self.total_features = <unsigned int>len(self.geodf)
self.dForceReductionFactor = 0
self.values = geodf[[field_idx]].astype(float).values.T[0]
self.values = geodf.T.iloc[field_idx].astype(float).values
self.aLocal = <Holder *>malloc(self.total_features * sizeof(Holder))
if not self.aLocal:
raise MemoryError()
Expand Down
2 changes: 1 addition & 1 deletion misc/Docker/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ RUN wget https://bootstrap.pypa.io/get-pip.py && python3.6 get-pip.py
RUN cd /home/app/magrit/ \
&& pip3.6 install -U -r requirements-dev.txt \
&& python3.6 setup.py install
RUN cd /home/app && cp /usr/local/lib/python3.6/dist-packages/magrit_app-0.3.0-py3.6-linux-x86_64.egg/magrit_app/helpers/*.so /home/app/magrit/magrit_app/helpers/
RUN cd /home/app && cp /usr/local/lib/python3.6/dist-packages/magrit_app-0.3.1-py3.6-linux-x86_64.egg/magrit_app/helpers/*.so /home/app/magrit/magrit_app/helpers/

EXPOSE 9999

Expand Down
2 changes: 1 addition & 1 deletion misc/dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ RUN wget https://bootstrap.pypa.io/get-pip.py && python3.6 get-pip.py
RUN cd /home/app/magrit/ \
&& pip3.6 install -U -r requirements-dev.txt \
&& python3.6 setup.py install
RUN cd /home/app && cp /usr/local/lib/python3.6/dist-packages/magrit_app-0.3.0-py3.6-linux-x86_64.egg/magrit_app/helpers/*.so /home/app/magrit/magrit_app/helpers/
RUN cd /home/app && cp /usr/local/lib/python3.6/dist-packages/magrit_app-0.3.1-py3.6-linux-x86_64.egg/magrit_app/helpers/*.so /home/app/magrit/magrit_app/helpers/

EXPOSE 9999

Expand Down

0 comments on commit bc70613

Please sign in to comment.