Skip to content
Snippets Groups Projects
Commit 32f8e054 authored by smartschat's avatar smartschat
Browse files

Fix data type bug in Python 3.

parent 2dc21848
No related branches found
No related tags found
No related merge requests found
......@@ -172,7 +172,7 @@ class InstanceExtractor:
arc_information[arc] = (
(numpy.array(feats[0], dtype=numpy.uint32),
numpy.array(feats[1], dtype=numpy.uint32),
numpy.array(feats[2], dtype=float)),
numpy.array(feats[2], dtype="float32")),
numpy.array(cost, dtype=float),
cons)
......
......@@ -501,7 +501,7 @@ cdef class Perceptron:
double costs,
numpy.uint32_t[:] nonnumeric_features,
numpy.uint32_t[:] numeric_features,
double[:] numeric_vals):
float[:] numeric_vals):
cdef double score = 0.0
cdef int index = 0
......@@ -524,7 +524,7 @@ cdef class Perceptron:
double[:] cached_weights,
numpy.uint32_t[:] nonnumeric_features,
numpy.uint32_t[:] numeric_features,
double[:] numeric_vals,
float[:] numeric_vals,
double update_val_for_weights,
double update_val_for_cached_weights):
cdef int index
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment