Skip to content

sort_asc allows NaN input #253

@syclik

Description

@syclik

Summary:

sort_asc() and sort_desc() on a structure that contains NaN does not behave consistently.

  • break into following and include each in relevant header
    • prim/arr/fun/sort_asc.hpp
    • prim/arr/fun/sort_desc.hpp
    • prim/mat/fun/sort_asc.hpp
    • prim/mat/fun/sort_desc.hpp
  • remove rev and fwd sort files and includes in relevant headers
  • throw exception if NaN found

Can leave tests as is.

Reproducible Steps:

There's no ordering imposed for NaN, so no need.

Current Output:

Undefined.

Expected Output:

Throw exception.

Current Version:

v2.11.0

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions