Re: trouble with NUMPY constructor in UDF

2016-03-10 Thread Andy Davidson
Clinton2016-03-09 11:44:301457552670736032.822569 61HillaryClinton2016-03-09 11:44:451457552685736032.822743 From: Andrew Davidson Date: Thursday, March 10, 2016 at 2:52 PM To: Ted Yu Cc: "user @spark" Subject: Re: trouble with NUMPY constructor in UDF > Hi Ted > > In py

Re: trouble with NUMPY constructor in UDF

2016-03-10 Thread Andy Davidson
Hi Ted In python the data type is Œfloat64¹. I have tried using both sql FloatType and DoubleType how ever I get the same error Strange andy From: Ted Yu Date: Wednesday, March 9, 2016 at 3:28 PM To: Andrew Davidson Cc: "user @spark" Subject: Re: trouble with NUMPY construc

Re: trouble with NUMPY constructor in UDF

2016-03-09 Thread Ted Yu
bq. epoch2numUDF = udf(foo, FloatType()) Is it possible that return value from foo is not FloatType ? On Wed, Mar 9, 2016 at 3:09 PM, Andy Davidson wrote: > I need to convert time stamps into a format I can use with matplotlib > plot_date(). epoch2num() works fine if I use it in my driver how e

trouble with NUMPY constructor in UDF

2016-03-09 Thread Andy Davidson
I need to convert time stamps into a format I can use with matplotlib plot_date(). epoch2num() works fine if I use it in my driver how ever I get a numpy constructor error if use it in a UDF Any idea what the problem is? Thanks Andy P.s I am using python3 and spark-1.6 from pyspark.sql.functio