Hey Stefano,
Stefan is indeed correct, when you pass a regular NumPy array back to MonetDB it (incorrectly) assumes that there are no null values in the array. I've pushed a change to default to fix it (http://dev.monetdb.org/hg/MonetDB/rev/c2487cd300be). Alternatively, you can convert your NumPy array to a masked array instead (using e.g. numpy.ma.masked_array(a, mask=numpy.isnan(a)), where a is your original array).
Regards,
Mark
----- Original Message -----
From: "Stefan Manegold"
Hello,
I am creating a table using the result of an embedded py function. The result of the function is a dictionary composed of numpy arrays. The function and the CREATE TABLE work well. Inside the arrays of the dictionary, I have a few np.nan values, they seem to be recognized by monet during the creation of the table. In fact, when I query the whole table, I can see ‘null’ in the proper places.
But if I try to compare against these null values, I get nothing (SELECT * FROM table where field is null). After a few trials, it seems to me that monet understands that np.nan is a NULL value, but then when it inserts the value into the table the internal representation (?) is somewhat different form a ‘normal’ NULL value.
Any suggestion?
Thanks,
Stefano
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
-- | Stefan.Manegold@CWI.nl | DB Architectures (DA) | | www.CWI.nl/~manegold/ | Science Park 123 (L321) | | +31 (0)20 592-4212 | 1098 XG Amsterdam (NL) | _______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list