Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dynd/cpp/array.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ cdef extern from 'dynd/array.hpp' namespace 'dynd::nd' nogil:
intptr_t get_dim_size() except +translate_exception
intptr_t get_dim_size(intptr_t) except +translate_exception

array p(string)
array p(string) except +translate_exception

char *data() const
const char *cdata() const
Expand Down
5 changes: 4 additions & 1 deletion dynd/nd/array.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,10 @@ cdef class array(object):
if (pair.first == <string> name):
return dynd_nd_array_from_cpp(pair.second(self.v))

return dynd_nd_array_from_cpp(self.v.p(name))
try:
return dynd_nd_array_from_cpp(self.v.p(name))
except ValueError:
raise AttributeError(name)

def __setattr__(self, name, value):
if self.v.is_null():
Expand Down