fixes #5: handle problematic cases in linspace