Use frombuffer

* Issue #8