Changeset 085696b


Ignore:
Timestamp:
Jan 29, 2019, 3:14:39 AM (5 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/crepe_org
Children:
5a89af0
Parents:
45a28ea
Message:

[tensor] have_same_shape returns false on null pointers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ai/tensor.c

    r45a28ea r085696b  
    141141{
    142142  uint_t n;
    143   AUBIO_ASSERT(a && b);
    144   if (a->ndim != b->ndim) {
     143  if (!a || !b)
    145144    return 0;
    146   }
     145  if (a->ndim != b->ndim)
     146    return 0;
     147
    147148  for (n = 0; n < a->ndim; n++) {
    148149    if (a->shape[n] != b->shape[n]) {
Note: See TracChangeset for help on using the changeset viewer.