File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -304,11 +304,11 @@ VALUE ruby_whisper_model_type(VALUE self)
304304static bool
305305check_memory_view (rb_memory_view_t * memview )
306306{
307- if (strcmp (memview -> format , "f" ) != 0 ) {
307+ if (memview -> format != NULL && strcmp (memview -> format , "f" ) != 0 ) {
308308 rb_warn ("currently only format \"f\" is supported for MemoryView, but given: %s" , memview -> format );
309309 return false;
310310 }
311- if (memview -> ndim != 1 ) {
311+ if (memview -> format != NULL && memview -> ndim != 1 ) {
312312 rb_warn ("currently only 1 dimensional MemoryView is supported, but given: %zd" , memview -> ndim );
313313 return false;
314314 }
@@ -377,7 +377,7 @@ parse_samples(VALUE *samples, VALUE *n_samples)
377377 }
378378 parsed .n_samples = (int )n_samples_size ;
379379 } else {
380- rb_warn ("unable to get a memory view. fallbacks to Ruby object" );
380+ rb_warn ("unable to get a memory view. falls back to Ruby object" );
381381 if (rb_respond_to (* samples , id_length )) {
382382 parsed .n_samples = NUM2INT (rb_funcall (* samples , id_length , 0 ));
383383 } else {
You can’t perform that action at this time.
0 commit comments