0

In Python, I can create an empty list like this:

a = [None] * 5

But in DolphinDB, when I tried to run this:

a = take(NULL, 5)

the interpreter just gave the error message:

Not allowed to create void vector

So how can I create an empty vector with all elements being NULL?

Clyx
  • 43
  • 7
  • I think you can find your answer here: https://www.dolphindb.com/help/index.html?VectorSetTupleWithNULLs.html – Bikramjeet Singh Mar 11 '19 at 06:27
  • Thank you. But the help doc merely gives examples where some elements in the vector are NULL. What I want is to create an all-NULL vector – Clyx Mar 11 '19 at 06:34

1 Answers1

1

Maybe you can do it in this way:

array(int, 100, 100, NULL)

or

bigarray(double,10000000,10000000,NULL)

where NULL is the default value filled in the vector.

check this out

Ju Piece
  • 249
  • 3
  • 9